]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Merge branch 'master' into Juhu/strafehud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index 9d5cc1d42e3a051760ad5c528382d6448b465a2a..2306abd693ec02aad534192dc95b7f84710ddefe 100644 (file)
@@ -2,10 +2,10 @@
 
 #include <common/weapons/_all.qh>
 #include <common/stats.qh>
-#include <server/miscfunctions.qh>
 #include <common/effects/all.qh>
 #include <server/resources.qh>
 #include <server/main.qh>
+#include <server/world.qh>
 
 #include "damage.qh"
 #include "clientkill.qh"
@@ -72,7 +72,7 @@ float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets
                return 0;
 
        if(i == CHIMPULSE_CLONE_MOVING.impulse || i == CHIMPULSE_CLONE_STANDING.impulse)
-               if(this.lip < sv_clones)
+               if(this.lip < autocvar_sv_clones)
                        return 1;
 
        // haha
@@ -84,13 +84,13 @@ float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets
 
        // if we get here, player is not allowed to cheat. Log it.
        if(i)
-               bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", playername(this, false), i);
+               bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", playername(this.netname, this.team, false), i);
        else if(argc)
-               bprintf("Player %s^7 tried to use cheat '%s'\n", playername(this, false), argv(0));
+               bprintf("Player %s^7 tried to use cheat '%s'\n", playername(this.netname, this.team, false), argv(0));
        else if(fr)
-               bprintf("Player %s^7 tried to use cheat frame %d\n", playername(this, false), fr);
+               bprintf("Player %s^7 tried to use cheat frame %d\n", playername(this.netname, this.team, false), fr);
        else
-               bprintf("Player %s^7 tried to use an unknown cheat\n", playername(this, false));
+               bprintf("Player %s^7 tried to use an unknown cheat\n", playername(this.netname, this.team, false));
 
        return 0;
 }