Fixed end mission code on server

This commit is contained in:
SilentSpike 2015-07-02 16:42:40 +01:00
parent eeeb543424
commit 8c98f98472

View File

@ -18,11 +18,9 @@
if (GVAR(endMission) && isServer) then {
[{
if (player distance GVAR(penPos) < 200) then {
if ({isPlayer _x && alive _x && (_x distance GVAR(penPos)) > 200} count allUnits == 0) then {
[["endDeath", false], "BIS_fnc_endMission"] call BIS_fnc_MP;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
if ({isPlayer _x && alive _x && (_x distance GVAR(penPos)) > 200} count playableUnits == 0) then {
[["endDeath", false], "BIS_fnc_endMission"] call BIS_fnc_MP;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 2] call CBA_fnc_addPerFrameHandler;
};