]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure personal data doesn't store health at 0 (should fix endless death loop...
authorMario <mario@smbclan.net>
Wed, 1 Mar 2017 12:11:22 +0000 (22:11 +1000)
committerMario <mario@smbclan.net>
Wed, 1 Mar 2017 12:11:42 +0000 (22:11 +1000)
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;