mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 02:46:49 +00:00
Let the Gamesetup.cpp Autostart (starting from cl) use the gamesettings via the autostart gui page.
Comments and testing By: Langbart Fixes #6433 Differential Revision: D4492 Includes/Obsoletes D4287 This was SVN commit r26584.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -145,8 +145,7 @@ private:
|
||||
* See http://trac.wildfiregames.com/ticket/654
|
||||
*/
|
||||
|
||||
CNetServerWorker::CNetServerWorker(bool useLobbyAuth, int autostartPlayers) :
|
||||
m_AutostartPlayers(autostartPlayers),
|
||||
CNetServerWorker::CNetServerWorker(bool useLobbyAuth) :
|
||||
m_LobbyAuth(useLobbyAuth),
|
||||
m_Shutdown(false),
|
||||
m_ScriptInterface(NULL),
|
||||
@@ -429,10 +428,6 @@ void CNetServerWorker::Run()
|
||||
if (!RunStep())
|
||||
break;
|
||||
|
||||
// Implement autostart mode
|
||||
if (m_State == SERVER_STATE_PREGAME && (int)m_PlayerAssignments.size() == m_AutostartPlayers)
|
||||
StartGame(Script::StringifyJSON(ScriptRequest(m_ScriptInterface), &m_InitAttributes));
|
||||
|
||||
// Update profiler stats
|
||||
m_Stats->LatchHostState(m_Host);
|
||||
}
|
||||
@@ -1624,8 +1619,8 @@ void CNetServerWorker::SendHolePunchingMessage(const CStr& ipStr, u16 port)
|
||||
|
||||
|
||||
|
||||
CNetServer::CNetServer(bool useLobbyAuth, int autostartPlayers) :
|
||||
m_Worker(new CNetServerWorker(useLobbyAuth, autostartPlayers)),
|
||||
CNetServer::CNetServer(bool useLobbyAuth) :
|
||||
m_Worker(new CNetServerWorker(useLobbyAuth)),
|
||||
m_LobbyAuth(useLobbyAuth), m_UseSTUN(false), m_PublicIp(""), m_PublicPort(20595), m_Password()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user