Core/Vehicles: Also remove MOVEMENTFLAG_ROOT on ExitVehicle (thanks to Anubisss), and slight refactoring of code.

This commit is contained in:
Machiavelli
2011-02-23 04:08:11 +01:00
parent 867f6d3513
commit a6da435b84
2 changed files with 7 additions and 7 deletions
@@ -437,6 +437,13 @@ void Vehicle::RemovePassenger(Unit *unit)
data << uint32(2); // Counter
me->SendMessageToSet(&data, false);
}
unit->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
unit->m_movementInfo.t_pos.Relocate(0, 0, 0, 0);
unit->m_movementInfo.t_time = 0;
unit->m_movementInfo.t_seat = 0;
unit->Relocate(GetBase());
}
if (me->GetTypeId() == TYPEID_UNIT && me->ToCreature()->IsAIEnabled)