mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
b8abec0c61
commit
4a8e727ba5
@ -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);
|
||||
|
@ -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
|
||||
};
|
||||
}];
|
||||
|
Loading…
Reference in New Issue
Block a user