mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 07:32:45 +00:00
Allow changing the late-observer flag in a running game, fixes #3669.
Remove it from the game-attributes, since it is not used in the simulation, nor are they supposed to change in running games. This was SVN commit r17861.
This commit is contained in:
@@ -927,13 +927,7 @@ bool CNetServerWorker::OnAuthenticate(void* context, CFsmEvent* event)
|
||||
|
||||
// Optionally allow observers to join after the game has started
|
||||
bool observerLateJoin = false;
|
||||
ScriptInterface& scriptInterface = server.GetScriptInterface();
|
||||
JSContext* cx = scriptInterface.GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
JS::RootedValue settings(cx);
|
||||
scriptInterface.GetProperty(server.m_GameAttributes.get(), "settings", &settings);
|
||||
if (scriptInterface.HasProperty(settings, "ObserverLateJoin"))
|
||||
scriptInterface.GetProperty(settings, "ObserverLateJoin", observerLateJoin);
|
||||
CFG_GET_VAL("network.lateobserverjoins", observerLateJoin);
|
||||
|
||||
// If the game has already started, only allow rejoins
|
||||
bool isRejoining = false;
|
||||
|
||||
Reference in New Issue
Block a user