end spectator by global mission end event from server (#3659)

* end spectator by global mission end event from server

* add ;
This commit is contained in:
commy2 2016-05-07 22:17:21 +02:00 committed by Glowbal
parent b8abec0c61
commit 4a8e727ba5
2 changed files with 12 additions and 2 deletions

View File

@ -16,4 +16,14 @@ if (isServer) then {
};
// Should prevent unending spectator on mission end
addMissionEventHandler ["Ended",{ [QGVAR(EndMission)] call FUNC(interrupt) }];
if (isServer) then {
addMissionEventHandler ["Ended", {
[QGVAR(endMission), []] call EFUNC(common,globalEvent);
}];
};
[QGVAR(endMission), {
if (GVAR(isSet)) then {
[false] call FUNC(setSpectator);
};
}] call EFUNC(common,addEventHandler);

View File

@ -92,7 +92,7 @@ if (_set) then {
if (_this) then {
_display displayAddEventHandler ["KeyDown", {
if (_this select 1 == 1) then {
[false] call ace_spectator_fnc_setSpectator;
[false] call FUNC(setSpectator);
true
};
}];