]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Hack: only check one flag per team (fixes some oddities, but also means you may not...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index dd1e395c722156026e00d9047a1617eee54b283b..e6dc964fe893a0c08a58351a61877b91bce030c1 100644 (file)
@@ -77,13 +77,13 @@ float CheatsAllowed(entity this, float i, float argc, float fr) // the cheat get
 
        // 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", this.netname, i);
+               bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", playername(this, false), i);
        else if(argc)
-               bprintf("Player %s^7 tried to use cheat '%s'\n", this.netname, argv(0));
+               bprintf("Player %s^7 tried to use cheat '%s'\n", playername(this, false), argv(0));
        else if(fr)
-               bprintf("Player %s^7 tried to use cheat frame %d\n", this.netname, fr);
+               bprintf("Player %s^7 tried to use cheat frame %d\n", playername(this, false), fr);
        else
-               bprintf("Player %s^7 tried to use an unknown cheat\n", this.netname);
+               bprintf("Player %s^7 tried to use an unknown cheat\n", playername(this, false));
 
        return 0;
 }
@@ -153,7 +153,7 @@ float CheatImpulse(entity this, int imp)
                        this.personal.ammo_plasma = this.ammo_plasma;
                        this.personal.ammo_shells = this.ammo_shells;
                        this.personal.ammo_fuel = this.ammo_fuel;
-                       this.personal.health = this.health;
+                       this.personal.health = max(1, this.health);
                        this.personal.armorvalue = this.armorvalue;
                        this.personal.weapons = this.weapons;
                        this.personal.items = this.items;