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:
YetheSamartaka 2022-05-08 05:44:33 +02:00 committed by GitHub
parent ada486448c
commit e994906169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -175,6 +175,7 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Walthzer <walthzer.69@gmail.com> Walthzer <walthzer.69@gmail.com>
Winter <simon@agius-muscat.net> Winter <simon@agius-muscat.net>
wizpig64 wizpig64
YetheSamartaka
xrufix xrufix
Zakant <Zakant@gmx.de> Zakant <Zakant@gmx.de>
zGuba zGuba

View File

@ -46,7 +46,7 @@ class ACE_Medical_StateMachine {
onStateEntered = QFUNC(enteredStateUnconscious); onStateEntered = QFUNC(enteredStateUnconscious);
class DeathAI { class DeathAI {
targetState = "Dead"; targetState = "Dead";
condition = QUOTE(!GVAR(AIUnconsciousness) && {!isPlayer _this}); condition = QUOTE(!(_this getVariable [ARR_2(QQGVAR(AIUnconsciousness), GVAR(AIUnconsciousness))]) && {!isPlayer _this});
}; };
class WakeUp { class WakeUp {
targetState = "Injured"; targetState = "Injured";

View File

@ -38,6 +38,11 @@ if (isNil QEFUNC(medical,setUnconscious)) then {
[LSTRING(OnlyAlive)] call FUNC(showMessage); [LSTRING(OnlyAlive)] call FUNC(showMessage);
} else { } else {
private _unconscious = GETVAR(_unit,ACE_isUnconscious,false); 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 // Function handles locality for me
[_unit, !_unconscious, 10e10] call EFUNC(medical,setUnconscious); [_unit, !_unconscious, 10e10] call EFUNC(medical,setUnconscious);
}; };