mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed StateUnconscious to "ACE_isUnconscious"
This commit is contained in:
parent
7345cf91cf
commit
781ebaca95
@ -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);
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -10,4 +10,4 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
((_this select 0) getvariable [QGVAR(StateUnconscious),false]);
|
||||
((_this select 0) getvariable ["ACE_isUnconscious",false]);
|
@ -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);
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user