Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 1,510 Lines • ▼ Show 20 Lines | bool Autostart(const CmdLineArgs& args) | ||||
if (args.Has("autostart-host")) | if (args.Has("autostart-host")) | ||||
{ | { | ||||
InitPs(true, L"page_loading.xml", &scriptInterface, mpInitData); | InitPs(true, L"page_loading.xml", &scriptInterface, mpInitData); | ||||
size_t maxPlayers = 2; | size_t maxPlayers = 2; | ||||
if (args.Has("autostart-host-players")) | if (args.Has("autostart-host-players")) | ||||
maxPlayers = args.Get("autostart-host-players").ToUInt(); | maxPlayers = args.Get("autostart-host-players").ToUInt(); | ||||
g_NetServer = new CNetServer(maxPlayers); | g_NetServer = new CNetServer(false, maxPlayers); | ||||
g_NetServer->UpdateGameAttributes(&attrs, scriptInterface); | g_NetServer->UpdateGameAttributes(&attrs, scriptInterface); | ||||
bool ok = g_NetServer->SetupConnection(PS_DEFAULT_PORT); | bool ok = g_NetServer->SetupConnection(PS_DEFAULT_PORT); | ||||
ENSURE(ok); | ENSURE(ok); | ||||
g_NetClient = new CNetClient(g_Game, true); | g_NetClient = new CNetClient(g_Game, true); | ||||
g_NetClient->SetUserName(userName); | g_NetClient->SetUserName(userName); | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator