Should fix BIS_Effect eject/kill

excludes cars now
This commit is contained in:
icomrade
2016-10-19 13:23:44 -04:00
parent 606098a1e3
commit d116bfecb4
2 changed files with 26 additions and 39 deletions

View File

@@ -20,11 +20,27 @@ BIS_Effects_globalEvent = {
BIS_effects_gepv = _this;
publicVariable "BIS_effects_gepv";
_this call BIS_Effects_startEvent;
};
BIS_Effects_startEvent = {
private "_KillEject";
_KillEject = {
private "_cancel";
if (((vehicle player) == (_this select 0)) && {(vehicle player) != player} && {player in (crew (_This select 0))}) then {
_cancel = false;
{
if ((isInTraderCity || !canbuild) && {(player distance (_x select 0)) < (_x select 1)}) then {_cancel = true;};
} count DZE_SafeZonePosArray;
player action ["getOut", (_this select 0)];
if (!_cancel && {!((_this select 0) iskindof "car")}) then {
[player, "explosion"] spawn player_death;
};
};
};
switch (_this select 0) do {
case "AirDestruction": {
[_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;
@@ -32,6 +48,9 @@ BIS_Effects_startEvent = {
case "Burn": {
[_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
};
case "Eject": {
[_This select 1] call _KillEject;
};
};
};
"BIS_effects_gepv" addPublicVariableEventHandler {