Disable cookoff on RCWS turrets (#5605)

* Disable cookoff on RCWS turrets

* getNumber

* Change config name, add doc
This commit is contained in:
PabstMirror 2017-11-30 17:07:46 -06:00 committed by GitHub
parent e85c752ca6
commit b86ef91d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View File

@ -53,6 +53,13 @@ class CfgVehicles {
explosionEffect = "FuelExplosionBig";
};
class APC_Wheeled_02_base_F: Wheeled_APC_F { // Otokar ARMA - RCWS Turret
GVAR(ignoreTurret) = 1;
};
class APC_Tracked_01_base_F: Tank_F { // Namera, Nemmera - RCWS Turret
GVAR(ignoreTurret) = 1;
};
class B_MBT_01_base_F;
class B_MBT_01_cannon_F: B_MBT_01_base_F {
GVAR(turret)[] = {QGVAR(Turret_MBT_01),{0,-1,0.5}};

View File

@ -81,6 +81,7 @@ if (_simulationType == "tank") exitWith {
};
} else {
if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.8 + random 0.2}) then {
if ((_hitpoint == "hitturret") && {(getNumber (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ignoreTurret))) == 1}) exitWith {}; // ignore turrets like RCWS
_vehicle setDamage 1;
};
};

View File

@ -41,3 +41,14 @@ class MyVehicle {
Global cook off probability can also be adjusted with the `ace_cookoff_probabilityCoef` mission setting.
Higher values will make cook-off more probable, whilst lower values will make cook-off less probable.
## 3. Ignore damage to turret
For use on vehicles when damage to the main turret would not cause a vehicle cookoff.
e.g. RCWS turrets
```
class MyVehicle {
ace_cookoff_ignoreTurret = 1;
};
```