Added possibility to disallow rearm

> vehicle setVariable ["ace_rearm_disabled", true, true];
Also added ammo compatibility for RHS Mi24 with turret
This commit is contained in:
IngoKauffmann 2015-11-23 17:08:06 +01:00
parent 1804215dbb
commit 763df43fbc
3 changed files with 7 additions and 3 deletions

View File

@ -68,7 +68,7 @@ _vehicleActions = [];
} forEach _magazines; } forEach _magazines;
} forEach REARM_TURRET_PATHS; } forEach REARM_TURRET_PATHS;
}; };
if (_needToAdd) then { if (_needToAdd && !(_vehicle getVariable [QGVAR(disabled), false])) then {
_icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon");
if !((_icon select [0, 1]) == "\") then { if !((_icon select [0, 1]) == "\") then {
_icon = ""; _icon = "";

View File

@ -19,7 +19,7 @@
private ["_dummy","_magazineClass"]; private ["_dummy","_magazineClass"];
params ["_target", "_unit"]; params ["_target", "_unit"];
if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE}) exitWith {false}; if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE} || {_target getVariable [QGVAR(disabled), false]}) exitWith {false};
_dummy = _unit getVariable [QGVAR(dummy), objNull]; _dummy = _unit getVariable [QGVAR(dummy), objNull];
if (isNull _dummy) exitwith {false}; if (isNull _dummy) exitwith {false};

View File

@ -122,4 +122,8 @@ class CfgAmmo
ACE_muzzleVelocities[]={298, 330, 350}; ACE_muzzleVelocities[]={298, 330, 350};
ACE_barrelLengths[]={96.52, 127.0, 228.6}; ACE_barrelLengths[]={96.52, 127.0, 228.6};
}; };
class SubmunitionBase;
class rhs_ammo_127x108mm_x5: SubmunitionBase {
ACE_rearm_caliber=13;
}
}; };