Core/Movement: Fixed creature movement on transports

This commit is contained in:
Shauren
2013-12-31 14:12:02 +01:00
parent 9a1282aac6
commit 1cdc2e8c2a
3 changed files with 6 additions and 2 deletions

View File

@@ -1477,7 +1477,7 @@ void Creature::setDeathState(DeathState s)
CreatureTemplate const* cinfo = GetCreatureTemplate();
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
ClearUnitState(uint32(UNIT_STATE_ALL_STATE));
ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING));
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
LoadCreaturesAddon(true);
Motion_Initialize();

View File

@@ -1556,6 +1556,10 @@ void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const
void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
{
// TODO: Allow transports to be part of dynamic vmap tree
if (GetTransport())
return;
switch (GetTypeId())
{
case TYPEID_UNIT:

View File

@@ -60,7 +60,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner)
arrived = false;
owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_EVADE));
owner->ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~(UNIT_STATE_EVADE | UNIT_STATE_IGNORE_PATHFINDING)));
}
bool HomeMovementGenerator<Creature>::DoUpdate(Creature* owner, const uint32 /*time_diff*/)