MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / net_start1

Method net_start1

ogsr_engine/xrGame/Level_start.cpp:63–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63bool CLevel::net_start1()
64{
65 // Start client and server if need it
66 if (m_caServerOptions.size())
67 {
68 g_pGamePersistent->LoadTitle("st_server_starting");
69
70 typedef IGame_Persistent::params params;
71 params& p = g_pGamePersistent->m_game_params;
72 // Connect
73 Server = xr_new<xrServer>();
74
75 // if (!strstr(*m_caServerOptions,"/alife"))
76 if (xr_strcmp(p.m_alife, "alife"))
77 {
78 string64 l_name = "";
79 const char* SOpts = *m_caServerOptions;
80 strncpy_s(l_name, *m_caServerOptions, strchr(SOpts, '/') - SOpts);
81 // Activate level
82 if (strchr(l_name, '/'))
83 *strchr(l_name, '/') = 0;
84
85 m_name = l_name;
86
87 int id = pApp->Level_ID(l_name);
88
89 if (id < 0)
90 {
91 pApp->LoadEnd();
92 Msg("Can't find level: [%s]", l_name);
93 net_start_result_total = FALSE;
94 return true;
95 }
96 }
97 }
98 return true;
99}
100
101bool CLevel::net_start2()
102{

Callers

nothing calls this directly

Calls 6

MsgFunction · 0.85
LoadTitleMethod · 0.80
Level_IDMethod · 0.80
LoadEndMethod · 0.80
xr_strcmpFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected