fixed AI standing up before being killed

Doesn't matter if we enable AI again on dead units
This commit is contained in:
Glowbal 2015-04-17 21:06:30 +02:00
parent 9b4435827e
commit 31bc09a9a3
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ if ((local _unit) && {!([_unit] call EFUNC(common,isPlayer))}) then {
_unit disableConversation true;
} else {
//Sanity check to make sure we don't enable unconsious AI
if (_unit getVariable ["ace_isunconscious", false]) exitWith {ERROR("Enabling AI for unconsious unit");};
if (_unit getVariable ["ace_isunconscious", false] && alive _unit) exitWith {ERROR("Enabling AI for unconsious unit");};
_unit enableAI "MOVE";
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";

View File

@ -94,7 +94,7 @@ _startingTime = time;
if (!alive _unit) exitwith {
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
[_unit, false] call EFUNC(common,disableAI);
_unit setUnitPos _originalPos;
//_unit setUnitPos _originalPos;
_unit setUnconscious false;
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);