From c25158f836c3fb50010edac8bdabb9bf78475fd2 Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 21 Apr 2009 15:12:59 -0500 Subject: [PATCH] *Fix the bug that unit cannot enter vehicle. --HG-- branch : trunk --- src/game/Unit.cpp | 1 - src/game/Vehicle.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 475a3dc5db7..365e55cd22d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13486,7 +13486,6 @@ void Unit::EnterVehicle(Vehicle *vehicle) m_Vehicle->setFaction(getFaction()); addUnitState(UNIT_STAT_ONVEHICLE); - AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); //movementInfo is set in AddPassenger //packets are sent in AddPassenger diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index 2be74bd628b..0a388fe7f04 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -164,7 +164,6 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatNum) return; accessory->m_Vehicle = this; - accessory->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); AddPassenger(accessory, seatNum); } @@ -201,6 +200,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatNum) //RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + unit->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); VehicleSeatEntry const *veSeat = seat->second.seatInfo; unit->m_movementInfo.t_x = veSeat->m_attachmentOffsetX; unit->m_movementInfo.t_y = veSeat->m_attachmentOffsetY;