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=1e5fedbcb65b79d209fff4de1fd2e7b11045a861;hp=895318affc8261a3e3da6f16e7be025e7443a506;hb=a394baa72a77a2db64709e44caa89a6fb4aaf5f4;hpb=edf01df130d0d1877461561178b8833a9ab6051c diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 895318affc..1e5fedbcb6 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1,5 +1,5 @@ #include "sv_cmd.qh" -#include "all.qh" +#include "_mod.qh" #include "banning.qh" #include "cmd.qh" @@ -9,20 +9,19 @@ #include "../anticheat.qh" #include "../campaign.qh" -#include "../cl_client.qh" -#include "../cl_player.qh" +#include "../client.qh" +#include "../player.qh" #include "../g_world.qh" #include "../ipban.qh" #include "../playerdemo.qh" #include "../teamplay.qh" -#include "../bot/bot.qh" -#include "../bot/navigation.qh" -#include "../bot/scripting.qh" +#include "../bot/api.qh" -#include "../mutators/all.qh" +#include "../mutators/_mod.qh" #include +#include #include #include #include @@ -41,11 +40,11 @@ void PutObserverInServer(entity this); // used by GameCommand_make_mapinfo() void make_mapinfo_Think(entity this) { - if (MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1)) + if (_MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1)) { LOG_INFO("Done rebuiling mapinfos.\n"); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); - remove(this); + delete(this); } else { @@ -141,7 +140,7 @@ void GameCommand_adminmsg(float request, float argc) } successful = strcat(successful, (successful ? ", " : ""), client.netname); - LOG_TRACE("Message sent to ", client.netname, "\n"); + LOG_TRACE("Message sent to ", client.netname); continue; } @@ -227,7 +226,7 @@ void GameCommand_anticheat(float request, float argc) if (accepted > 0) { - anticheat_report(client); + anticheat_report_to_eventlog(client); return; } else @@ -742,7 +741,7 @@ void GameCommand_gametype(float request, float argc) if (argv(1) != "") { string s = argv(1); - float t = MapInfo_Type_FromString(s), tsave = MapInfo_CurrentGametype(); + Gametype t = MapInfo_Type_FromString(s), tsave = MapInfo_CurrentGametype(); if (t) { @@ -830,7 +829,7 @@ void GameCommand_gettaginfo(float request, float argc) LOG_INFO("bone not found\n"); } - remove(tmp_entity); + delete(tmp_entity); return; } } @@ -889,7 +888,7 @@ void GameCommand_animbench(float request, float argc) LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n"); LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n"); - remove(tmp_entity); + delete(tmp_entity); return; } } @@ -1329,7 +1328,7 @@ void GameCommand_shuffleteams(float request) { if (teamplay) { - float x, t_teams, t_players, team_color; + float t_teams, t_players, team_color; // count the total amount of players and total amount of teams t_players = 0; @@ -1367,15 +1366,15 @@ void GameCommand_shuffleteams(float request) for (int i = 1; i <= t_teams; ++i) { // find out how many players to assign to this team - x = (t_players / t_teams); - x = ((i == 1) ? ceil(x) : floor(x)); + int pnum = (t_players / t_teams); + pnum = ((i == 1) ? ceil(pnum) : floor(pnum)); team_color = Team_NumberToTeam(i); // sort through the random list of players made earlier for (int z = 1; z <= maxclients; ++z) { - if (!(shuffleteams_teams[i] >= x)) + if (!(shuffleteams_teams[i] >= pnum)) { if (!(shuffleteams_players[z])) continue; // not a player, move on to next random slot