mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Add AI Unconsciousness exception (when using zeus module) (#8903)
* Add DF-15 GForceCoef Value This adds missing ACE_GForceCoef value for DF-15 uniforms. * DF-15 PR - cfgWeapons formating DF-15 PR - cfgWeapons formating * DF-15 PR - cfgWeapons formating II Forgot to save it with braces and spaces around = * Update CfgWeapons.hpp * sync * Add AI Unconsciousness exception option - Adds AI Unconsciousness exception option. If enabled, it allows you to put AI into unconsciousness via Zeus Module even though the AI unconsciousness is disabled. This "feature" was possible before the medical rewrite and allowed to put selected AI units into unconsciousness even though the overall AI unconsciousness was disabled. This was very handy and many groups missing this option including myself. - Special thanks to Pterolatypus for consultation. * tabs to spaces tabs to spaces * last tab to space :copium: last tab to space :copium: * stringtable tabs to spaces stringtable tabs to spaces * Addon option removed, adjusted variable name - Addon option removed - adjusted variable name * utilized QEGVAR - utilized QEGVAR in getVariable * removed fnc and put the code inside the condition - I've managed to properly implement the getVariable inside the condition thus allowing me to remove the function. Also kymckay had a good point on swapping the order for faster eval. * Update XEH_PREP.hpp * setVariable optimalization - setVariable optimalization Co-authored-by: pterolatypus <pterolatypus@users.noreply.github.com> * Update addons/medical_statemachine/Statemachine.hpp Co-authored-by: pterolatypus <pterolatypus@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: pterolatypus <pterolatypus@users.noreply.github.com>
This commit is contained in:
parent
ada486448c
commit
e994906169
@ -175,6 +175,7 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Walthzer <walthzer.69@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
wizpig64
|
||||
YetheSamartaka
|
||||
xrufix
|
||||
Zakant <Zakant@gmx.de>
|
||||
zGuba
|
||||
zGuba
|
@ -46,7 +46,7 @@ class ACE_Medical_StateMachine {
|
||||
onStateEntered = QFUNC(enteredStateUnconscious);
|
||||
class DeathAI {
|
||||
targetState = "Dead";
|
||||
condition = QUOTE(!GVAR(AIUnconsciousness) && {!isPlayer _this});
|
||||
condition = QUOTE(!(_this getVariable [ARR_2(QQGVAR(AIUnconsciousness), GVAR(AIUnconsciousness))]) && {!isPlayer _this});
|
||||
};
|
||||
class WakeUp {
|
||||
targetState = "Injured";
|
||||
|
@ -38,6 +38,11 @@ if (isNil QEFUNC(medical,setUnconscious)) then {
|
||||
[LSTRING(OnlyAlive)] call FUNC(showMessage);
|
||||
} else {
|
||||
private _unconscious = GETVAR(_unit,ACE_isUnconscious,false);
|
||||
if (_unconscious) then {
|
||||
_unit setVariable [QEGVAR(medical_statemachine,AIUnconsciousness), nil, true];
|
||||
} else {
|
||||
_unit setVariable [QEGVAR(medical_statemachine,AIUnconsciousness), true, true];
|
||||
};
|
||||
// Function handles locality for me
|
||||
[_unit, !_unconscious, 10e10] call EFUNC(medical,setUnconscious);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user