MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetCVarNone

Function SetCVarNone

Descent3/dedicated_server.cpp:379–402  ·  view source on GitHub ↗

Sets the value for a cvar NONE type

Source from the content-addressed store, hash-verified

377
378// Sets the value for a cvar NONE type
379void 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
405void SetCVarInt(int index, int val) {

Callers 1

SetCVarFunction · 0.85

Calls 5

MultiLeaveGameFunction · 0.85
SetFunctionModeFunction · 0.85
MultiEndLevelFunction · 0.85
rtp_StartLogFunction · 0.85
rtp_StopLogFunction · 0.85

Tested by

no test coverage detected