Do not remove MOVEMENTFLAG_ONTRANSPORT when unit has existing GAMEOBJECT_TYPE_TRANSPORT in movement info

Note that this will fix movement on elevators only visualy ( server position is still going to be wrong )

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-13 10:04:48 +01:00
parent ac4bab5451
commit 3af5237f8c

View File

@@ -307,7 +307,11 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
}
if (!mover->GetTransport() && !mover->GetVehicle())
movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT;
{
GameObject *go = mover->GetMap()->GetGameObject(movementInfo.t_guid);
if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT)
movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT;
}
}
else if (plMover && plMover->GetTransport()) // if we were on a transport, leave
{