From d14a4a237208a0d781dbef44c219340f3ba2b186 Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 25 Aug 2009 00:56:23 -0500 Subject: *Fix the bug that sometimes vehicle is not usable after respawn. --HG-- branch : trunk --- src/game/Creature.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index a1cb9e5649f..8299d74f389 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1794,9 +1794,7 @@ void Creature::setDeathState(DeathState s) SetHealth(GetMaxHealth()); SetLootRecipient(NULL); ResetPlayerDamageReq(); - Unit::setDeathState(ALIVE); CreatureInfo const *cinfo = GetCreatureInfo(); - RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); clearUnitState(UNIT_STAT_ALL_STATE); @@ -1805,6 +1803,7 @@ void Creature::setDeathState(DeathState s) Motion_Initialize(); if(GetCreatureData() && GetPhaseMask() != GetCreatureData()->phaseMask) SetPhaseMask(GetCreatureData()->phaseMask, false); + Unit::setDeathState(ALIVE); } } -- cgit v1.2.3