mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix dead bodies removal, when forced = 1
- Removed unused(?) GVAR(Module) - Removed "white space alignment" in module.sqf
This commit is contained in:
parent
545ecc0f8e
commit
66c2bf0506
@ -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));
|
||||
};
|
||||
};
|
||||
|
||||
|
17
addons/respawn/XEH_serverPostInit.sqf
Normal file
17
addons/respawn/XEH_serverPostInit.sqf
Normal 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);
|
@ -19,25 +19,9 @@
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
if (!_activated) exitWith {};
|
||||
|
||||
GVAR(Module) = true;
|
||||
|
||||
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule);
|
||||
[_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.");
|
||||
|
Loading…
Reference in New Issue
Block a user