X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fsv_cmd.qc;h=7dbafa7ab8b747d888e1e06868a3717938463d3a;hp=ba9b48a294a7ea5f9bc4bbda9eff993f0c8168b2;hb=61ff03e493f0cdae7d4a7b4332481f1a3971c3c7;hpb=756a2e093820dc91621b95d955ca48a3462af3cb diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index ba9b48a294..7dbafa7ab8 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -93,7 +93,7 @@ void GameCommand_adminmsg(float request, float argc) client = GetFilteredEntity(t); accepted = VerifyClientEntity(client, TRUE, FALSE); - if not(accepted > 0) + if(accepted <= 0) { print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n")); continue; @@ -736,7 +736,12 @@ void GameCommand_gametype(float request, float argc) MapInfo_SwitchGameType(t); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); if(MapInfo_count > 0) + { + // update lsmaps in case the gametype changed, this way people can easily list maps for it + if(lsmaps_reply != "") { strunzone(lsmaps_reply); } + lsmaps_reply = strzone(getlsmaps()); bprint("Game type successfully switched to ", s, "\n"); + } else { bprint("Cannot use this game type: no map for it found\n"); @@ -987,7 +992,7 @@ void GameCommand_moveplayer(float request, float argc) client = GetFilteredEntity(t); accepted = VerifyClientEntity(client, FALSE, FALSE); - if not(accepted > 0) + if(accepted <= 0) { print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n")); continue; @@ -1143,7 +1148,7 @@ void GameCommand_playerdemo(float request, float argc) client = GetIndexedEntity(argc, 2); accepted = VerifyClientEntity(client, FALSE, TRUE); - if not(accepted > 0) + if(accepted <= 0) { print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n"); return; @@ -1159,7 +1164,7 @@ void GameCommand_playerdemo(float request, float argc) client = GetIndexedEntity(argc, 2); accepted = VerifyClientEntity(client, FALSE, FALSE); - if not(accepted > 0) + if(accepted <= 0) { print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n"); return; @@ -1355,9 +1360,9 @@ void GameCommand_shuffleteams(float request) // sort through the random list of players made earlier for(z = 1; z <= maxclients; ++z) { - if not(shuffleteams_teams[i] >= x) + if (!(shuffleteams_teams[i] >= x)) { - if not(shuffleteams_players[z]) + if (!(shuffleteams_players[z])) continue; // not a player, move on to next random slot if(VerifyClientNumber(shuffleteams_players[z]))