| 61 | } |
| 62 | |
| 63 | bool 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 | |
| 101 | bool CLevel::net_start2() |
| 102 | { |