From 2604f91b8504c3e01d3faccb769ad4501096d1b3 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Mar 2017 22:11:22 +1000 Subject: [PATCH] Make sure personal data doesn't store health at 0 (should fix endless death loop if waypoint is spawned while dead) --- qcsrc/server/cheats.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index d54feeac8..e6dc964fe 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -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; -- 2.39.2