mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed QGVAR(isDead) to ACE_isDead
Minor improvements to debug function
This commit is contained in:
parent
a92430b701
commit
bbf9ce61f0
@ -145,7 +145,7 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
||||
|
||||
[QGVAR(reviveCounter_f), 0, false, QGVAR(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(inReviveState), false, true, QGVAR(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(isDead),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
["ACE_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);
|
||||
["ACE_isUnconscious",false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
|
@ -37,8 +37,8 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug);
|
||||
};
|
||||
};
|
||||
// ["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
};
|
||||
} else {
|
||||
if (!isNull ([_unit] call FUNC(getCarriedObj))) then {
|
||||
@ -61,8 +61,8 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
_unit setvariable [QGVAR(carriedObj),_to,true];
|
||||
_return = true;
|
||||
|
||||
// ["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -16,21 +16,26 @@ private ["_msg", "_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLeve
|
||||
_msg = _this select 0;
|
||||
_level = if (count _this > 1) then {_this select 1} else { 2 };
|
||||
|
||||
if (typeName _level != "NUMBER") then {
|
||||
_level = 2;
|
||||
};
|
||||
|
||||
_defaultLoglevel = if (isNil QGVAR(LOGLEVEL)) then {
|
||||
DEFAULT_LOGGING_LEVEL;
|
||||
} else {
|
||||
GVAR(LOGLEVEL);
|
||||
};
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {
|
||||
false
|
||||
};
|
||||
|
||||
_defaultLogDisplayLevel = if (isnil QGVAR(LOGDISPLAY_LEVEL)) then {
|
||||
DEFAULT_TEXT_DISPLAY;
|
||||
} else {
|
||||
GVAR(LOGDISPLAY_LEVEL);
|
||||
};
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {
|
||||
false
|
||||
};
|
||||
if (_level <= _defaultLoglevel) then {
|
||||
|
||||
_prefix = switch (_level) do {
|
||||
@ -42,7 +47,7 @@ if (_level <= _defaultLoglevel) then {
|
||||
};
|
||||
_message = format["[%1] %2",_prefix,_msg];
|
||||
|
||||
if (_level >= _defaultLogDisplayLevel) then {
|
||||
if (_level <= _defaultLogDisplayLevel) then {
|
||||
systemChat _message;
|
||||
};
|
||||
diag_log _message;
|
||||
|
@ -43,7 +43,7 @@ if (_unit getVariable ["ACE_isUnconscious", false] && {!_force}) exitWith {
|
||||
};
|
||||
|
||||
// don't go unconscious if the unit isn't unconscious
|
||||
if (_animation == "Unconscious" && {!(_unit getVariable ["ACE_isUnconscious", false])}) exitWith {};
|
||||
if (_animation == "Unconscious" && {!((_unit getVariable ["ACE_isUnconscious", false]) || (_unit getVariable ["ACE_isDead", false]))}) exitWith {};
|
||||
|
||||
// switchMove "" no longer works in dev 1.37
|
||||
if (_animation == "") then {
|
||||
|
@ -12,4 +12,4 @@
|
||||
|
||||
private ["_unit","_return"];
|
||||
_unit = _this select 0;
|
||||
(!([_unit] call FUNC(isUnconscious))) && alive _unit && !(_unit getvariable [QGVAR(isDead),false]);
|
||||
(!([_unit] call FUNC(isUnconscious))) && alive _unit && !(_unit getvariable ["ACE_isDead",false]);
|
||||
|
@ -35,7 +35,7 @@ _caller = _this select 1;
|
||||
_newUnit disableAI "MOVE";
|
||||
_newUnit disableAI "ANIM";
|
||||
_newUnit disableAI "FSM";
|
||||
_newUnit setvariable [QGVAR(isDead),true,true];
|
||||
_newUnit setvariable ["ACE_isDead",true,true];
|
||||
|
||||
removeallweapons _newUnit;
|
||||
removeallassigneditems _newUnit;
|
||||
|
@ -13,7 +13,7 @@
|
||||
private ["_unit","_oldUnit","_sets"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_unit setvariable [QGVAR(isDead),nil,true];
|
||||
_unit setvariable ["ACE_isDead",nil,true];
|
||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||
|
||||
if (isPlayer _unit) then {
|
||||
|
@ -62,7 +62,7 @@ if (((GVAR(ENABLE_REVIVE_F) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE_F) ==
|
||||
if (isPlayer _unit) then {
|
||||
titleText ["You died..","PLAIN DOWN"];
|
||||
};
|
||||
[_unit,QGVAR(isDead), true, true] call FUNC(setDefinedVariable);
|
||||
[_unit,"ACE_isDead", true, true] call FUNC(setDefinedVariable);
|
||||
if (_playerDead) then {
|
||||
[_unit,QGVAR(isDeadPlayer),true,true] call FUNC(setDefinedVariable);
|
||||
};
|
||||
@ -78,7 +78,7 @@ if (((GVAR(ENABLE_REVIVE_F) == 1 && isPlayer _unit) || (GVAR(ENABLE_REVIVE_F) ==
|
||||
|
||||
};
|
||||
|
||||
[_unit,QGVAR(isDead),true,true] call FUNC(setDefinedVariable);
|
||||
[_unit,"ACE_isDead",true,true] call FUNC(setDefinedVariable);
|
||||
if (isPLayer _unit) then {
|
||||
[_unit,QGVAR(isDeadPlayer),true,true] call FUNC(setDefinedVariable);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user