From c390b989660d6a63844e7b049df999ae9cbbbdbc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 28 Feb 2016 15:14:05 +0100 Subject: [PATCH] - fixed: Not all paths in A_CStaffCheck did proper checks on the player's health. --- src/g_hexen/a_clericstaff.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/g_hexen/a_clericstaff.cpp b/src/g_hexen/a_clericstaff.cpp index 964a78503..1653e5ebc 100644 --- a/src/g_hexen/a_clericstaff.cpp +++ b/src/g_hexen/a_clericstaff.cpp @@ -112,7 +112,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck) { newLife = player->health + (damage >> 4); newLife = newLife > max ? max : newLife; - pmo->health = player->health = newLife; + if (newLife > player->health) + { + pmo->health = player->health = newLife; + } P_SetPsprite(player, ps_weapon, weapon->FindState("Drain")); } if (weapon != NULL)