Sets the value for a cvar NONE type
| 377 | |
| 378 | // Sets the value for a cvar NONE type |
| 379 | void SetCVarNone(int index) { |
| 380 | if (CVars[index].type != CVAR_TYPE_NONE) |
| 381 | return; // Only handles ints |
| 382 | |
| 383 | // Do command specific stuff here |
| 384 | if (index == CVAR_QUIT) { |
| 385 | if (NetPlayers[Player_num].sequence == NETSEQ_PLAYING) { |
| 386 | MultiLeaveGame(); |
| 387 | SetFunctionMode(QUIT_MODE); |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | if (index == CVAR_ENDLEVEL) { |
| 392 | if (NetPlayers[Player_num].sequence == NETSEQ_PLAYING) { |
| 393 | MultiEndLevel(); |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | if (index == CVAR_STARTLOG) |
| 398 | rtp_StartLog(); |
| 399 | |
| 400 | if (index == CVAR_STOPLOG) |
| 401 | rtp_StopLog(); |
| 402 | } |
| 403 | |
| 404 | // Sets the value for a cvar INT type |
| 405 | void SetCVarInt(int index, int val) { |
no test coverage detected