mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #4056 from acemod/fixReviveLoop
Fix order of revive loop
This commit is contained in:
commit
62a0c49fc2
@ -21,13 +21,6 @@ if (!local _unit) exitWith {};
|
|||||||
|
|
||||||
private _startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
|
private _startTime = _unit getVariable [QGVAR(reviveStartTime), 0];
|
||||||
|
|
||||||
// Remove heartbeat
|
|
||||||
if (GVAR(level) >= 2) then {
|
|
||||||
if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
|
|
||||||
_unit setVariable [QGVAR(heartRate), 0];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// If we are in revive state in a blown up vehicle, try to unload so that people can access the body
|
// If we are in revive state in a blown up vehicle, try to unload so that people can access the body
|
||||||
if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then {
|
if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then {
|
||||||
TRACE_2("Unloading", _unit, vehicle _unit);
|
TRACE_2("Unloading", _unit, vehicle _unit);
|
||||||
@ -52,5 +45,12 @@ if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith {
|
|||||||
_unit setVariable [QGVAR(reviveStartTime), nil];
|
_unit setVariable [QGVAR(reviveStartTime), nil];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Remove heartbeat
|
||||||
|
if (GVAR(level) >= 2) then {
|
||||||
|
if (_unit getVariable [QGVAR(heartRate), 60] > 0) then {
|
||||||
|
_unit setVariable [QGVAR(heartRate), 0];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// Schedule the loop to be executed again 1 sec later
|
// Schedule the loop to be executed again 1 sec later
|
||||||
[DFUNC(reviveStateLoop), [_unit], 1] call CBA_fnc_waitAndExecute;
|
[DFUNC(reviveStateLoop), [_unit], 1] call CBA_fnc_waitAndExecute;
|
||||||
|
Loading…
Reference in New Issue
Block a user