aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-21 15:12:59 -0500
committermegamage <none@none>2009-04-21 15:12:59 -0500
commitc25158f836c3fb50010edac8bdabb9bf78475fd2 (patch)
tree073d9c5b85d729d034b9b56a8011da0f3d68aee5
parent32e44b6c99a01b7f505309cdc7b81640fa852852 (diff)
*Fix the bug that unit cannot enter vehicle.
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp1
-rw-r--r--src/game/Vehicle.cpp2
2 files changed, 1 insertions, 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;