Cargo - Add array to disable paradrop effects (#7016)

This commit is contained in:
PabstMirror 2019-07-03 09:58:46 -05:00 committed by GitHub
parent 8a867cc997
commit aa41fffdb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -11,5 +11,6 @@ PREP_RECOMPILE_END;
GVAR(initializedItemClasses) = [];
GVAR(initializedVehicleClasses) = [];
GVAR(cargoHolderTypes) = ["Car", "Air", "Tank", "Ship", "Cargo_base_F", "Land_PaperBox_closed_F"];
GVAR(disableParadropEffectsClasstypes) = ["Car_F"];
ADDON = true;

View File

@ -69,8 +69,10 @@ _itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vecto
_item attachTo [_parachute, [0,0,1]];
_parachute setVelocity _velocity;
private _light = "Chemlight_yellow" createVehicle [0,0,0];
_light attachTo [_item, [0,0,0]];
if ((GVAR(disableParadropEffectsClasstypes) findIf {_item isKindOf _x}) == -1) then {
private _light = "Chemlight_yellow" createVehicle [0,0,0];
_light attachTo [_item, [0,0,0]];
};
}, [_itemObject], 0.7] call CBA_fnc_waitAndExecute;
@ -83,8 +85,10 @@ _itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vecto
};
if (getPos _item select 2 < 1) then {
private _smoke = "SmokeshellYellow" createVehicle [0,0,0];
_smoke attachTo [_item, [0,0,0]];
if ((GVAR(disableParadropEffectsClasstypes) findIf {_item isKindOf _x}) == -1) then {
private _smoke = "SmokeshellYellow" createVehicle [0,0,0];
_smoke attachTo [_item, [0,0,0]];
};
[_this select 1] call CBA_fnc_removePerFrameHandler;
};