X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fgamecommand.qc;h=9dd7e8784845b615cea2f87ab34f512643c5012d;hb=303ead3f668736766fe0b5e918076653d07844b0;hp=24558057c1e5edf009fc0f5909012c47c43b77c2;hpb=1af87e8e3ee43fc72d88d8915bb93685b142a7a1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index 24558057c..9dd7e8784 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -651,6 +651,7 @@ void GameCommand(string command) print(" radarmap [--force] [--quit | --loop] [sharpness]\n"); print(" bbox\n"); print(" cvar_changes\n"); + print(" cvar_purechanges\n"); print(" find classname\n"); GameCommand_Vote("help", world); GameCommand_Ban("help"); @@ -912,6 +913,11 @@ void GameCommand(string command) print(cvar_changes); return; } + if (argv(0) == "cvar_purechanges") + { + print(cvar_purechanges); + return; + } if (argv(0) == "find") if(argc == 2) { for(client = world; (client = find(client, classname, argv(1))); ) @@ -951,6 +957,7 @@ void GameCommand(string command) if(argv(0) == "debug_shotorg") { debug_shotorg = stov(argv(1)); + debug_shotorg_y = -debug_shotorg_y; return; } @@ -960,15 +967,25 @@ void GameCommand(string command) if(argv(1) == "w") setmodel(e, (nextent(world)).weaponentity.model); else + { + precache_model(argv(1)); setmodel(e, argv(1)); + } e.frame = stof(argv(2)); - i = gettagindex(e, argv(3)); + if(substring(argv(3), 0, 1) == "#") + i = stof(substring(argv(3), 1, -1)); + else + i = gettagindex(e, argv(3)); if(i) { v = gettaginfo(e, i); - print("model ", e.model, " frame ", ftos(e.frame), " tag ", argv(3)); - print(" index = ", ftos(i)); + print("model ", e.model, " frame ", ftos(e.frame), " tag ", gettaginfo_name); + print(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n"); print(" vector = ", ftos(v_x), " ", ftos(v_y), " ", ftos(v_z), "\n"); + print(" offset = ", ftos(gettaginfo_offset_x), " ", ftos(gettaginfo_offset_y), " ", ftos(gettaginfo_offset_z), "\n"); + print(" forward = ", ftos(gettaginfo_forward_x), " ", ftos(gettaginfo_forward_y), " ", ftos(gettaginfo_forward_z), "\n"); + print(" right = ", ftos(gettaginfo_right_x), " ", ftos(gettaginfo_right_y), " ", ftos(gettaginfo_right_z), "\n"); + print(" up = ", ftos(gettaginfo_up_x), " ", ftos(gettaginfo_up_y), " ", ftos(gettaginfo_up_z), "\n"); if(argc >= 6) { v_y = -v_y; @@ -1333,6 +1350,17 @@ void GameCommand(string command) return; } + if(argv(0) == "showtraceline") + { + vector src, dst; + src = stov(argv(1)); + dst = stov(argv(2)); + traceline(src, dst, MOVE_NORMAL, world); + trailparticles(world, particleeffectnum("TR_NEXUIZPLASMA"), src, trace_endpos); + trailparticles(world, particleeffectnum("TR_CRYLINKPLASMA"), trace_endpos, dst); + return; + } + print("Invalid command. For a list of supported commands, try sv_cmd help.\n"); }