Changed StateUnconscious to "ACE_isUnconscious"

This commit is contained in:
Thomas Kooi 2015-01-17 14:13:37 +01:00
parent 7345cf91cf
commit 781ebaca95
5 changed files with 9 additions and 9 deletions

View File

@ -141,7 +141,7 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
[QGVAR(isDead),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(isDeadPlayer), false, true, QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(StateUnconscious),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
["ACE_isUnconscious",false,true,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(ENABLE_REVIVE_SETDEAD_F),0,false,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);

View File

@ -36,14 +36,14 @@ if (count _this > 3) then {
};
// don't overwrite more important animations
if (_unit getVariable [/*"ACE_isUnconscious"*/ QGVAR(StateUnconscious), false] && {!_force}) exitWith {
if (_unit getVariable ["ACE_isUnconscious", false] && {!_force}) exitWith {
if (_animation != "Unconscious") then {
[_unit, "Unconscious", 2] call FUNC(doAnimation);
};
};
// don't go unconscious if the unit isn't unconscious
if (_animation == "Unconscious" && {!(_unit getVariable [/*"ACE_isUnconscious"*/ QGVAR(StateUnconscious), false])}) exitWith {};
if (_animation == "Unconscious" && {!(_unit getVariable ["ACE_isUnconscious", false])}) exitWith {};
// switchMove "" no longer works in dev 1.37
if (_animation == "") then {

View File

@ -10,4 +10,4 @@
#include "script_component.hpp"
((_this select 0) getvariable [QGVAR(StateUnconscious),false]);
((_this select 0) getvariable ["ACE_isUnconscious",false]);

View File

@ -14,7 +14,7 @@ private ["_unit","_oldUnit","_sets"];
_unit = _this select 0;
_unit setvariable [QGVAR(isDead),nil,true];
_unit setvariable [QGVAR(stateUnconscious), nil, true];
_unit setvariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then {
[true] call FUNC(setVolume_f);

View File

@ -27,7 +27,7 @@ if (!local _unit) exitwith {
[_unit, ObjNull, [0,0,0]] call FUNC(carryObj);
// Set the unit in the unconscious state.
_unit setvariable [QGVAR(StateUnconscious),true,true];
_unit setvariable ["ACE_isUnconscious",true,true];
_unit setUnconscious true;
// If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious,
@ -51,7 +51,7 @@ if (isPlayer _unit) then {
};
// So the AI does not get stuck, we are moving the unit to a temp group on its own.
[_unit, true, QGVAR(StateUnconscious), side group _unit] call FUNC(switchToGroupSide_f);
[_unit, true, "ACE_isUnconscious", side group _unit] call FUNC(switchToGroupSide_f);
_captiveSwitch = [_unit, true] call FUNC(setCaptiveSwitch);
[_unit, [_unit] call FUNC(getDeathAnim), 1, true] call FUNC(doAnimation);
@ -112,7 +112,7 @@ _minWaitingTime = (round(random(10)+5));
_unit setUnconscious false;
// Swhich the unit back to its original group
[_unit, false, QGVAR(StateUnconscious), side group _unit] call FUNC(switchToGroupSide_f);
[_unit, false, "ACE_isUnconscious", side group _unit] call FUNC(switchToGroupSide_f);
// Reset any visual and audio effects for players, or enable everything again for AI.
if (isPlayer _unit) then {
@ -125,7 +125,7 @@ _minWaitingTime = (round(random(10)+5));
};
// Move unit out of unconscious state
_unit setvariable [QGVAR(StateUnconscious), false, true];
_unit setvariable ["ACE_isUnconscious", false, true];
[format["%1 Unit no longer unconsicous"], _unit] call FUNC(debug);
};
};