]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Make sure personal data doesn't store health at 0 (should fix endless death loop...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index d54feeac84111662ae3d320880b488c38775c902..e6dc964fe893a0c08a58351a61877b91bce030c1 100644 (file)
@@ -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;