Update BIS Effects and fix eject bug for Cessna

This commit fixes the cessna getOut bug. Sometimes if the cessna explodes and the player did not die he was trapped inside of the cessna wreck. Switching from getOut to eject fixes this problem.
Ive did a lot tests and it should be save to eject instead of getOut.
This commit is contained in:
AirwavesMan
2020-10-31 10:19:27 +01:00
parent 7851663842
commit 0b6df45690
3 changed files with 35 additions and 30 deletions

View File

@@ -1,10 +1,13 @@
private ["_amm"];
_amm=_this select 4;
_this call (call compile GetText (configFile >> "CfgAmmo" >> _amm >> "muzzleEffect"));
//Handle combat in vehicle
if (player in (crew (_this select 0))) then {
if !(player getVariable ["inCombat",false]) then {
player setVariable ["inCombat",true,true];
if !(isDedicated) then {
private "_amm";
_amm = _this select 4;
_this call (call compile GetText (configFile >> "CfgAmmo" >> _amm >> "muzzleEffect"));
//Handle combat in vehicle
if (player in (crew (_this select 0))) then {
if !(player getVariable ["inCombat",false]) then {
player setVariable ["inCombat",true,true];
};
player setVariable["combattimeout", diag_tickTime + 30, false];
};
player setVariable["combattimeout", diag_tickTime + 30, false];
};

View File

@@ -42,24 +42,27 @@ if (isNil "BIS_Effects_Init_DZ") then {
{
if ((isInTraderCity || !canbuild) && {(player distance (_x select 0)) < (_x select 1)}) exitWith {_cancel = true;};
} count DZE_SafeZonePosArray;
player action ["getOut", (_this select 0)];
player action ["eject", (_this select 0)];
if (!_cancel && !((_this select 0) iskindof "car")) then {
[player, "explosion"] call player_death;
};
};
};
switch (_this select 0) do {
case "AirDestruction": {
[_this select 1] spawn BIS_Effects_AirDestruction;
[_this select 1] call _KillEject;
call {
private "_state";
_state = _this select 0;
if (_state == "AirDestruction") exitwith {
[_this select 1] spawn BIS_Effects_AirDestruction;
[_this select 1] call _KillEject;
};
case "AirDestructionStage2": {
[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
if (_state == "AirDestructionStage2") exitwith {
[_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
};
case "Burn": {
[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
if (_state == "Burn") exitwith {
[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
};
case "Eject": {
if (_state == "Eject") exitwith {
[_this select 1] call _KillEject;
};
};

View File

@@ -1,18 +1,17 @@
private ["_v","_int","_t","_b"];
_v=_this select 0;
private ["_v","_int","_isVeh","_b"];
_v = _this select 0;
if (!DZE_NoVehicleExplosions) then {
if (_v iskindof "helicopter" || _v iskindof "plane") then {
["AirDestruction", _v] call BIS_Effects_globalEvent;
};
if (_v iskindof "tank") then {
_int = (fuel _v)*(2+random 2);
_t = time;
[_v,_int] spawn BIS_Effects_Secondaries;
["Eject", _v] call BIS_Effects_globalEvent;
};
if (_v iskindof "car" || _v iskindof "ship") then {
_int = (fuel _v)*(2 + random 1);
_t = time;
[_v,_int] spawn BIS_Effects_Secondaries;
["Eject", _v] call BIS_Effects_globalEvent;
if ((random _int)>2.2) then