Unconscious Timer

This commit is contained in:
He-Man 2019-04-04 21:44:54 +02:00
parent 8f64d961c3
commit e628588602
2 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,7 @@ if !(_source isEqualTo _unit) then {
if !(lifeState _unit == "INCAPACITATED") then {
EPOCH_HandleDamageTimeOut = diag_ticktime + 1;
_unit setUnconscious true;
EPOCH_UnconsciousTime = diag_ticktime + 60 + (random 120);
};
};
};

View File

@ -427,6 +427,13 @@ if (cameraview isequalto "GROUP") then {
vehicle player switchCamera "Internal";
};
if (lifeState player == "INCAPACITATED") then {
if ((missionnamespace getvariable ["EPOCH_UnconsciousTime",diag_ticktime]) < diag_ticktime) then {
player setUnconscious false;
player playMoveNow 'AmovPercMstpSnonWnonDnon';
};
};
// force update
if (EPOCH_forceUpdateNow) then {
_forceUpdate = false;