posible fix for #1932

This commit is contained in:
Joko 2015-07-28 18:36:13 +02:00
parent a31e5795be
commit 55cac4b6d9
5 changed files with 70 additions and 18 deletions

View File

@ -28,11 +28,56 @@ class CfgVehicles {
class Helicopter;
class ParachuteBase: Helicopter {
ace_hasReserveParachute = 1;
ace_reserveParachute = "ACE_ReserveParachute";
MACRO_HASRESERVE
};
class ParachuteWest: ParachuteBase {
MACRO_HASRESERVE
};
class ParachuteEast: ParachuteBase {
MACRO_HASRESERVE
};
class ParachuteG: ParachuteBase {
MACRO_HASRESERVE
};
class Parachute: ParachuteWest {
MACRO_HASRESERVE
};
class NonSteerable_Parachute_F: Parachute {
MACRO_HASRESERVE
};
class Paraglide: ParachuteWest{
MACRO_HASRESERVE
};
class Steerable_Parachute_F: Paraglide{
MACRO_HASRESERVE
};
class parachuteBase;
class Parachute_02_base_F: parachuteBase {
MACRO_HASRESERVE
};
class B_Parachute_02_F: Parachute_02_base_F {
MACRO_HASRESERVE
};
class O_Parachute_02_F: Parachute_02_base_F {
MACRO_HASRESERVE
};
class I_Parachute_02_F: Parachute_02_base_F {
MACRO_HASRESERVE
};
class BagBase;
class B_Parachute:BagBase {
MACRO_HASRESERVE
};
class B_B_Parachute_02_F: B_Parachute {
MACRO_HASRESERVE
};
class B_O_Parachute_02_F: B_Parachute {
MACRO_HASRESERVE
};
class B_I_Parachute_02_F: B_Parachute {
MACRO_HASRESERVE
};
class B_Parachute;
class ACE_NonSteerableParachute: B_Parachute {
author = ECSTRING(common,ACETeam);
scope = 2;
@ -41,6 +86,7 @@ class CfgVehicles {
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
ParachuteClass = "NonSteerable_Parachute_F";
MACRO_HASRESERVE
maximumLoad = 0;
mass = 100;
};

View File

@ -42,5 +42,6 @@ GVAR(PFH) = false;
// don't show speed and height when in expert mode
["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute);
["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler);

View File

@ -19,4 +19,4 @@ _unit = _this select 0;
_vehicle = vehicle _unit;
_unit action ["GetOut", _vehicle];
deleteVehicle _vehicle;
_unit setVariable [QGVAR(chuteIsCut), true];
_unit setVariable [QGVAR(chuteIsCut), true];

View File

@ -14,17 +14,17 @@
*
* Public: No
*/
#include "script_component.hpp"
private ["_unit","_backpack"];
_unit = _this select 0;
_backpack = (_this select 1) select 6 ;
if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then {
_unit addBackpack (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
} else {
if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then {
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute")];
};
if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then {
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))];
};
};
#include "script_component.hpp"
private ["_unit","_backpack"];
_unit = _this select 0;
_backpack = (_this select 1) select 6 ;
if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then {
_unit addBackpack (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
} else {
if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then {
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute")];
};
if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then {
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))];
};
};

View File

@ -1,3 +1,4 @@
#define DEBUG_ENABLED_PARACHUTE
#define COMPONENT parachute
#include "\z\ace\addons\main\script_mod.hpp"
@ -10,3 +11,7 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define MACRO_HASRESERVE ace_hasReserveParachute = 1; \
ace_reserveParachute = "ACE_ReserveParachute";