Fix dead bodies removal, when forced = 1

- Removed unused(?) GVAR(Module)
- Removed "white space alignment" in module.sqf
This commit is contained in:
Cuel 2016-05-03 20:10:28 +02:00
parent 545ecc0f8e
commit 66c2bf0506
3 changed files with 20 additions and 18 deletions

View File

@ -14,6 +14,7 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit));
};
};

View File

@ -0,0 +1,17 @@
#include "script_component.hpp"
["SettingsInitialized", {
if (GVAR(RemoveDeadBodiesDisconnected)) then {
addMissionEventHandler ["HandleDisconnect", {
[{
params ["_unit"];
if (!alive _unit) then {
deleteVehicle _unit;
};
},
_this, 4] call EFUNC(common,waitAndExecute);
false
}];
};
}] call EFUNC(common,addEventHandler);

View File

@ -19,25 +19,9 @@
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};
GVAR(Module) = true;
if (!_activated) exitWith {};
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(RemoveDeadBodiesDisconnected), "RemoveDeadBodiesDisconnected"] call EFUNC(common,readSettingFromModule);
if (isServer && {GVAR(RemoveDeadBodiesDisconnected)}) then {
addMissionEventHandler ["HandleDisconnect", {
[{
params ["_unit"];
if (!alive _unit) then {
deleteVehicle _unit;
};
},
_this, 4] call EFUNC(common,waitAndExecute);
false
}];
};
ACE_LOGINFO("Respawn Module Initialized.");