From 8d59bf8179fcc936e9296910c680429a70347c77 Mon Sep 17 00:00:00 2001 From: maximius Date: Mon, 12 Oct 2009 13:50:47 -0700 Subject: [PATCH] *Bitwise logic does not work on values that are not bitmasks. Thanks Spp for pointing this block of code out :) --HG-- branch : trunk --- src/game/Unit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 90eab95401..6bdb04cd90 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11971,8 +11971,7 @@ void Unit::SetHealth(uint32 val) { if(getDeathState() == JUST_DIED) val = 0; - // causes instant permadeath if you exit game while in combat?! :-| - else if((GetTypeId() == TYPEID_PLAYER) && (getDeathState() & (DEAD | DEAD_FALLING)) != 0) + else if(GetTypeId() == TYPEID_PLAYER && (getDeathState() == DEAD || getDeathState() == DEAD_FALLING)) val = 1; else {