From 7c720763558fbf4a35755b6055e6a127326834a5 Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 23 Aug 2009 00:38:19 -0500 Subject: *Fix the bug that some vehicles cannot fly. --HG-- branch : trunk --- src/game/MovementHandler.cpp | 9 +++++++++ src/game/Player.cpp | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index f518c7f4da4..04033050b40 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -459,7 +459,16 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) return; if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) + { GetPlayer()->SetMover(mover); + if(mover != GetPlayer() && mover->canFly()) + { + WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12); + data.append(mover->GetPackGUID()); + data << uint32(0); + SendPacket(&data); + } + } else { sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " I64FMT " and should be " I64FMT, guid, _player->m_mover->GetGUID()); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 9d4f60c571d..e849311d79c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20215,13 +20215,6 @@ void Player::SetClientControl(Unit* target, uint8 allowMove) GetSession()->SendPacket(&data); if(target == this) SetMover(this); - else if(target->canFly()) - { - WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12); - data.append(target->GetPackGUID()); - data << uint32(0); - SendDirectMessage(&data); - } } void Player::UpdateZoneDependentAuras( uint32 newZone ) -- cgit v1.2.3