From 330017686ec11130e4cb0626759bfd9202e436a6 Mon Sep 17 00:00:00 2001 From: MGT Date: Sun, 24 Jun 2018 14:26:55 +0100 Subject: [PATCH] Update EPOCH_server_save_killedBuilding.sqf Check if building killer is the owner and log accordingly --- .../epoch_vehicle/EPOCH_server_save_killedBuilding.sqf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf index 71015670..1a22ce7c 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_killedBuilding.sqf @@ -35,6 +35,14 @@ if (!isNull _building) then { publicvariable "EPOCH_BaseCams"; }; - ['BuildingKilled', format["%1 was killed by %2 at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog; + // Check if building killer is the owner and log accordingly + if ((_building getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID _killer, _killer getVariable["GROUP", ""]]) then + { + ['BuildingRemoved', format["%1 was removed by %2 (owner) at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog; + } + else + { + ['BuildingKilled', format["%1 was killed by %2 at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog; + }; }; };