From 501c9ba0e73eec0e82d8d56891667ba6bd28a06e Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 13 May 2019 12:16:52 +0200 Subject: [PATCH] delete vehicle trailer on vdestroy --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 1 + ReallifeGamemode.Server/Events/Key.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 47587712..67012bcb 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -954,6 +954,7 @@ namespace ReallifeGamemode.Server.Commands } VehicleManager.DeleteVehicle(targetVeh); + targetVeh.Trailer?.Delete(); } [Command("vlivery", "~m~Benutzung: ~s~/vlivery [Livery]")] diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 82cfdf1b..d860c575 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -115,7 +115,7 @@ namespace ReallifeGamemode.Server.Events }; string faction = u.FactionLeader ? u.Faction.Name : null; - string group = u.Group?.Name ?? null; + string group = u.Group != null && u.GroupRank >= GroupRank.MANAGER ? u.Group.Name : null; bool factionInvite = player.HasData("accept_faction_invite"); bool groupInvite = player.HasData("accept_group_invite");