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=1076225d82acaf1e89a00432927c4c95b8593c34;hp=0471cff0721aa4f61d6ad165d497d152d24e3419;hb=50d6cb6a02a959a7303b5b687631b664a807b26f;hpb=e51ce3d45d2852ca793118fc73da9c25f789101f diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 0471cff072..1076225d82 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -15,7 +15,6 @@ #include "../player.qh" #include "../g_world.qh" #include "../ipban.qh" -#include "../playerdemo.qh" #include "../teamplay.qh" #include "../bot/api.qh" @@ -32,13 +31,6 @@ #include - -void PutObserverInServer(entity this); - -// ===================================================== -// Server side game commands code, reworked by Samual -// ===================================================== - // used by GameCommand_make_mapinfo() void make_mapinfo_Think(entity this) { @@ -1173,86 +1165,6 @@ void GameCommand_nospectators(float request) } } -void GameCommand_playerdemo(float request, float argc) -{ - switch (request) - { - case CMD_REQUEST_COMMAND: - { - if (argv(2) && argv(3)) - { - entity client; - float i, n, accepted; - - switch (argv(1)) - { - case "read": - { - client = GetIndexedEntity(argc, 2); - accepted = VerifyClientEntity(client, false, true); - - if (accepted <= 0) - { - LOG_INFO("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), "."); - return; - } - - playerdemo_open_read(client, argv(next_token)); - return; - } - - case "write": - { - client = GetIndexedEntity(argc, 2); - accepted = VerifyClientEntity(client, false, false); - - if (accepted <= 0) - { - LOG_INFO("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), "."); - return; - } - - playerdemo_open_write(client, argv(next_token)); - return; - } - - case "auto_read_and_write": - { - n = GetFilteredNumber(argv(3)); - cvar_set("bot_number", ftos(n)); - - localcmd("wait; wait; wait\n"); - for (i = 0; i < n; ++i) - localcmd("sv_cmd playerdemo read ", ftos(i + 2), " ", argv(2), ftos(i + 1), "\n"); - localcmd("sv_cmd playerdemo write 1 ", ftos(n + 1), "\n"); - return; - } - - case "auto_read": - { - n = GetFilteredNumber(argv(3)); - cvar_set("bot_number", ftos(n)); - - localcmd("wait; wait; wait\n"); - for (i = 0; i < n; ++i) - localcmd("sv_cmd playerdemo read ", ftos(i + 2), " ", argv(2), ftos(i + 1), "\n"); - return; - } - } - } - } - - default: - LOG_INFO("Incorrect parameters for ^2playerdemo^7"); - case CMD_REQUEST_USAGE: - { - LOG_INFO("Usage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)"); - LOG_INFO(" Full list of commands here: \"read, write, auto_read_and_write, auto_read.\""); - return; - } - } -} - void GameCommand_printstats(float request) { switch (request) @@ -1578,10 +1490,13 @@ void GameCommand_trace(float request, float argc) if (argc == 4 || argc == 5) { e = nextent(NULL); + int dphitcontentsmask_save = e.dphitcontentsmask; + e.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP; if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), stof(argv(4)), MOVE_NORMAL)) LOG_INFO("can walk"); else LOG_INFO("cannot walk"); + e.dphitcontentsmask = dphitcontentsmask_save; return; } } @@ -1733,7 +1648,6 @@ SERVER_COMMAND(lockteams, "Disable the ability for players to switch or enter te SERVER_COMMAND(make_mapinfo, "Automatically rebuild mapinfo files") { GameCommand_make_mapinfo(request); } SERVER_COMMAND(moveplayer, "Change the team/status of a player") { GameCommand_moveplayer(request, arguments); } SERVER_COMMAND(nospectators, "Automatically remove spectators from a match") { GameCommand_nospectators(request); } -SERVER_COMMAND(playerdemo, "Control the ability to save demos of players") { GameCommand_playerdemo(request, arguments); } SERVER_COMMAND(printstats, "Dump eventlog player stats and other score information") { GameCommand_printstats(request); } SERVER_COMMAND(radarmap, "Generate a radar image of the map") { GameCommand_radarmap(request, arguments); } SERVER_COMMAND(reducematchtime, "Decrease the timelimit value incrementally") { GameCommand_reducematchtime(request); }