Files
DayZ-Epoch/SQF/dayz_code/system/BIS_Effects/killed.sqf
icomrade d116bfecb4 Should fix BIS_Effect eject/kill
excludes cars now
2016-10-19 13:23:44 -04:00

29 lines
926 B
Plaintext

private ["_v","_int","_t","_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
{
_b = createVehicle ["SmallSecondary", (getPosATL _v), [], 0, "CAN_COLLIDE"];
};
};
} else {
_isVeh = (_v iskindof "helicopter" || _v iskindof "plane" || _v iskindof "tank" || _v iskindof "car" || _v iskindof "ship");
if (_isVeh && {player in (crew _v)}) then {
["Eject", _v] call BIS_Effects_globalEvent;
};
};