*Bitwise logic does not work on values that are not bitmasks. Thanks Spp for pointing this block of code out :)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-12 13:50:47 -07:00
parent cb09262c1a
commit 8d59bf8179
+1 -2
View File
@@ -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
{