X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fsv_cmd.qc;h=4699049d2deece5103cd4fd67b94be28d1085083;hb=503b522f7617f737cc1b814b27bf3b486b52de79;hp=0fa5667601609ab6efb1be21a435453a13aa4274;hpb=4f926be80533640c5531417f7553de6c3da0c528;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 0fa566760..4699049d2 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -81,6 +81,7 @@ void GameCommand_adminmsg(float request, float argc) float infobartime = stof(argv(3)); string successful, t; + successful = string_null; if((targets) && (admin_message)) { @@ -166,7 +167,7 @@ void GameCommand_allspec(float request, float argc) { entity client; string reason = argv(1); - float i; + float i = 0; FOR_EACH_REALPLAYER(client) { @@ -222,7 +223,7 @@ void GameCommand_anticheat(float request, float argc) } } -void GameCommand_bbox(float request) // legacy +void GameCommand_bbox(float request) { switch(request) { @@ -315,7 +316,7 @@ void GameCommand_bbox(float request) // legacy } } -void GameCommand_bot_cmd(float request, float argc) // mostly legacy +void GameCommand_bot_cmd(float request, float argc) { switch(request) { @@ -441,7 +442,7 @@ void GameCommand_cointoss(float request, float argc) } } -void GameCommand_database(float request, float argc) // legacy +void GameCommand_database(float request, float argc) { switch(request) { @@ -528,7 +529,7 @@ void GameCommand_defer_clear_all(float request) case CMD_REQUEST_COMMAND: { entity client; - float i; + float i = 0; float argc; FOR_EACH_CLIENT(client) @@ -552,7 +553,7 @@ void GameCommand_defer_clear_all(float request) } } -void GameCommand_delrec(float request, float argc) // legacy // perhaps merge later with records and printstats and such? +void GameCommand_delrec(float request, float argc) // perhaps merge later with records and printstats and such? { switch(request) { @@ -581,7 +582,7 @@ void GameCommand_delrec(float request, float argc) // legacy // perhaps merge la } } -void GameCommand_effectindexdump(float request) // legacy +void GameCommand_effectindexdump(float request) { switch(request) { @@ -659,7 +660,7 @@ void GameCommand_effectindexdump(float request) // legacy } } -void GameCommand_extendmatchtime(float request) // legacy +void GameCommand_extendmatchtime(float request) { switch(request) { @@ -680,7 +681,7 @@ void GameCommand_extendmatchtime(float request) // legacy } } -void GameCommand_find(float request, float argc) // legacy // is this even needed? We have prvm_edicts command and such ANYWAY +void GameCommand_find(float request, float argc) // is this even needed? We have prvm_edicts command and such ANYWAY { switch(request) { @@ -705,7 +706,7 @@ void GameCommand_find(float request, float argc) // legacy // is this even neede } } -void GameCommand_gametype(float request, float argc) // legacy +void GameCommand_gametype(float request, float argc) { switch(request) { @@ -748,7 +749,7 @@ void GameCommand_gametype(float request, float argc) // legacy } } -void GameCommand_gettaginfo(float request, float argc) // legacy +void GameCommand_gettaginfo(float request, float argc) { switch(request) { @@ -808,7 +809,7 @@ void GameCommand_gettaginfo(float request, float argc) // legacy } } -void GameCommand_gotomap(float request, float argc) // mostly legacy +void GameCommand_gotomap(float request, float argc) { switch(request) { @@ -862,7 +863,7 @@ void GameCommand_lockteams(float request) } } -void GameCommand_make_mapinfo(float request) // legacy +void GameCommand_make_mapinfo(float request) { switch(request) { @@ -904,6 +905,7 @@ void GameCommand_moveplayer(float request, float argc) string notify = argv(3); string successful, t; + successful = string_null; // lets see if the target(s) even actually exist. if((targets) && (destination)) @@ -1027,7 +1029,7 @@ void GameCommand_moveplayer(float request, float argc) } } -void GameCommand_nospectators(float request) // legacy +void GameCommand_nospectators(float request) { switch(request) { @@ -1057,7 +1059,7 @@ void GameCommand_nospectators(float request) // legacy } } -void GameCommand_playerdemo(float request, float argc) // mostly legacy +void GameCommand_playerdemo(float request, float argc) { switch(request) { @@ -1138,7 +1140,7 @@ void GameCommand_playerdemo(float request, float argc) // mostly legacy } } -void GameCommand_printstats(float request) // legacy +void GameCommand_printstats(float request) { switch(request) { @@ -1182,7 +1184,7 @@ void GameCommand_radarmap(float request, float argc) } } -void GameCommand_reducematchtime(float request) // legacy +void GameCommand_reducematchtime(float request) { switch(request) { @@ -1238,10 +1240,12 @@ void GameCommand_shuffleteams(float request) { if(teamplay) { - entity tmp_player, client; - float i, x, z, t_teams, t_players, team_color, accepted; + entity tmp_player; + float i, x, z, t_teams, t_players, team_color; // count the total amount of players and total amount of teams + t_players = 0; + t_teams = 0; FOR_EACH_PLAYER(tmp_player) { CheckAllowedTeams(tmp_player); @@ -1347,7 +1351,7 @@ void GameCommand_stuffto(float request, float argc) { if(argv(2)) { - entity client = GetIndexedEntity(argc, 1)); + entity client = GetIndexedEntity(argc, 1); float accepted = VerifyClientEntity(client, TRUE, FALSE); if(accepted > 0) @@ -1387,7 +1391,6 @@ void GameCommand_trace(float request, float argc) { case CMD_REQUEST_COMMAND: { - // This is kinda a mess, a lot of it is legacy and thus not rewritten/optimized. entity e; vector org, delta, start, end, p, q, q0, pos, vv, dv; float i, f, safe, unsafe, dq, dqf; @@ -1422,7 +1425,6 @@ void GameCommand_trace(float request, float argc) { rint(42); // do an engine breakpoint on VM_rint so you can get the trace that errnoeously returns startsolid tracebox(start, PL_MIN, PL_MAX, end, MOVE_NOMONSTERS, world); - tracebox(p, PL_MIN, PL_MAX, q, MOVE_NOMONSTERS, world); if(trace_startsolid) { @@ -1588,7 +1590,7 @@ void GameCommand_unlockteams(float request) } } -void GameCommand_warp(float request, float argc) // mostly legacy +void GameCommand_warp(float request, float argc) { switch (request) { @@ -1804,4 +1806,4 @@ void GameCommand(string command) print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n"); return; -} \ No newline at end of file +}