| 234 | } |
| 235 | |
| 236 | static bool launchGameFromCmdLineOptions() |
| 237 | { |
| 238 | const auto& cmdLineOptions = getCommandLineOptions(); |
| 239 | try |
| 240 | { |
| 241 | if (cmdLineOptions.action == CommandLineAction::host) |
| 242 | { |
| 243 | Network::openServer(); |
| 244 | return loadFile(cmdLineOptions.path); |
| 245 | } |
| 246 | else if (cmdLineOptions.action == CommandLineAction::join) |
| 247 | { |
| 248 | if (cmdLineOptions.port) |
| 249 | { |
| 250 | return Network::joinServer(cmdLineOptions.address, *cmdLineOptions.port); |
| 251 | } |
| 252 | else |
| 253 | { |
| 254 | return Network::joinServer(cmdLineOptions.address); |
| 255 | } |
| 256 | } |
| 257 | else if (!cmdLineOptions.path.empty()) |
| 258 | { |
| 259 | return loadFile(cmdLineOptions.path); |
| 260 | } |
| 261 | } |
| 262 | catch (const std::exception& e) |
| 263 | { |
| 264 | Logging::error("Unable to load park: {}", e.what()); |
| 265 | } |
| 266 | return false; |
| 267 | } |
| 268 | |
| 269 | void sub_431695(uint16_t var_F253A0) |
| 270 | { |
no test coverage detected