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

Function DMFCInputCommand_Warp

netgames/dmfc/dmfcinputcommand.cpp:970–990  ·  view source on GitHub ↗

handles a request to warp to another level Usage: "$warp "

Source from the content-addressed store, hash-verified

968// handles a request to warp to another level
969// Usage: "$warp <level number>"
970void DMFCInputCommand_Warp(const char *input_string) {
971 if (basethis->GetLocalRole() != LR_SERVER)
972 return;
973
974 char s[20];
975 int level;
976
977 // parse "$warp"
978 if (!StringParseWord(input_string, s, 20, &input_string)) {
979 basethis->DisplayInputCommandHelp(DTXT_IC_WARP);
980 return;
981 }
982
983 // parse levelnum
984 if (!StringParseNumber(input_string, &level, &input_string)) {
985 basethis->DisplayInputCommandHelp(DTXT_IC_WARP);
986 return;
987 }
988
989 basethis->WarpToLevel(level);
990}
991
992// handles enable/disable remote administration
993// Usage: "$remoteadmin <on/off>"

Callers

nothing calls this directly

Calls 5

StringParseWordFunction · 0.85
StringParseNumberFunction · 0.85
GetLocalRoleMethod · 0.80
WarpToLevelMethod · 0.80

Tested by

no test coverage detected