mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add NonSteerable Reserve Parachute (#3689)
* Add NonSteerable Reserve Parachute Close #3364 * Use params
This commit is contained in:
parent
8bd4afed6b
commit
1742629045
@ -83,7 +83,8 @@ class CfgVehicles {
|
|||||||
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
|
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
|
||||||
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
|
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
|
||||||
ParachuteClass = "NonSteerable_Parachute_F";
|
ParachuteClass = "NonSteerable_Parachute_F";
|
||||||
MACRO_HASRESERVE
|
ace_hasReserveParachute = 1;
|
||||||
|
ace_reserveParachute = "ACE_NonSteerableReserveParachute";
|
||||||
maximumLoad = 0;
|
maximumLoad = 0;
|
||||||
mass = 100;
|
mass = 100;
|
||||||
};
|
};
|
||||||
@ -97,6 +98,10 @@ class CfgVehicles {
|
|||||||
ace_reserveParachute = "";
|
ace_reserveParachute = "";
|
||||||
ace_hasReserveParachute = 0;
|
ace_hasReserveParachute = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ACE_NonSteerableReserveParachute: ACE_ReserveParachute {
|
||||||
|
ParachuteClass = "NonSteerable_Parachute_F";
|
||||||
|
};
|
||||||
|
|
||||||
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
|
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
|
||||||
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
|
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
|
||||||
|
@ -15,16 +15,17 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_unit","_backpack"];
|
|
||||||
_unit = _this select 0;
|
params ["_unit", "_gear"];
|
||||||
_backpack = (_this select 1) select 6;
|
private _backpack = _gear select 6;
|
||||||
if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) then {
|
|
||||||
|
if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then {
|
||||||
_unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
|
_unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
|
||||||
} else {
|
} else {
|
||||||
if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then {
|
if ((getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")) == 1) then {
|
||||||
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true];
|
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true];
|
||||||
};
|
};
|
||||||
if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then {
|
if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && {!(animationState _unit == 'para_pilot')}) then {
|
||||||
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true];
|
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user