mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fixed PFH to use EFUNC(common,waitAndExecute)
This commit is contained in:
parent
b318d2cced
commit
9f2f660b89
@ -32,24 +32,23 @@ GVAR(Module) = true;
|
||||
|
||||
if (isServer) then {
|
||||
if (GVAR(RemoveDeadBodiesDisconnected)) then {
|
||||
_fnc_deleteDisconnected = {
|
||||
[
|
||||
{
|
||||
_unit = (_this select 0) select 0;
|
||||
addMissionEventHandler ["HandleDisconnect",
|
||||
{
|
||||
[
|
||||
{
|
||||
_unit = _this select 0;
|
||||
|
||||
if (!alive _unit) then {
|
||||
deleteVehicle _unit;
|
||||
|
||||
[_this select 0] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
},
|
||||
4,
|
||||
[_this]
|
||||
] call CBA_fnc_addPerFrameHandler
|
||||
false
|
||||
};
|
||||
|
||||
addMissionEventHandler ["HandleDisconnect", _fnc_deleteDisconnected];
|
||||
if (!alive _unit) then {
|
||||
deleteVehicle _unit;
|
||||
};
|
||||
},
|
||||
_this,
|
||||
4,
|
||||
1
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
false
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -37,23 +37,25 @@ if (count _position == 0) then {_position = getPosATL _unit};
|
||||
|
||||
_position set [2, 0];
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(common,displayTextStructured);
|
||||
[
|
||||
{
|
||||
_rallypoint = _this select 0;
|
||||
_unit = _this select 1;
|
||||
_position = _this select 2;
|
||||
_rallypoint = _this select 3;
|
||||
|
||||
[{
|
||||
_args = _this select 0;
|
||||
_rallypoint = _args select 0;
|
||||
_unit = _args select 1;
|
||||
_position = _args select 2;
|
||||
_rallypoint = _args select 3;
|
||||
_rallypoint setPosATL _position;
|
||||
_unit reveal _rallypoint;
|
||||
|
||||
_rallypoint setPosATL _position;
|
||||
_unit reveal _rallypoint;
|
||||
/*
|
||||
_marker = format ["AGM_RallyPoint_%1", _side];
|
||||
_marker setMarkerPos _position;
|
||||
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
|
||||
*/
|
||||
|
||||
/*
|
||||
_marker = format ["AGM_RallyPoint_%1", _side];
|
||||
_marker setMarkerPos _position;
|
||||
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
|
||||
*/
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(common,displayTextStructured);
|
||||
}, 5, [_rallypoint, _unit, _position, _rallypoint]]
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(common,displayTextStructured);
|
||||
},
|
||||
[_rallypoint, _unit, _position, _rallypoint],
|
||||
5,
|
||||
1
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
|
@ -29,12 +29,13 @@ if (_forceRemove) then {
|
||||
_bodyRemoveTimer = 2;
|
||||
};
|
||||
|
||||
[{
|
||||
|
||||
_unit = (_this select 1) select 0;
|
||||
// hideBody takes ~20s till body is fully underground
|
||||
// a better hideBody would make this more aesthetic
|
||||
deleteVehicle _unit;
|
||||
},
|
||||
_bodyRemoveTime,
|
||||
[_body]] call CBA_fnc_addPerFrameHandler
|
||||
[
|
||||
{
|
||||
// hideBody takes ~20s till body is fully underground
|
||||
// a better hideBody would make this more aesthetic
|
||||
deleteVehicle _this;
|
||||
},
|
||||
_body,
|
||||
_bodyRemoveTimer,
|
||||
1
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
|
Loading…
Reference in New Issue
Block a user