diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index f94718906..922b39e50 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -363,10 +363,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o); GetPlayer()->m_movementInfo = movementInfo; if (GetPlayer()->m_lastFallTime >= movementInfo.fallTime || GetPlayer()->m_lastFallZ <=movementInfo.z) - { - GetPlayer()->m_lastFallTime = movementInfo.fallTime; - GetPlayer()->m_lastFallZ= movementInfo.z; - } + GetPlayer()->SetFallInformation(movementInfo.fallTime, movementInfo.z); if(GetPlayer()->isMovingOrTurning()) GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c2e1d25f5..2f76c0632 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1556,6 +1556,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati else // this will be used instead of the current location in SaveToDB m_teleport_dest = WorldLocation(mapid, x, y, z, orientation); + SetFallInformation(0, z); //BuildHeartBeatMsg(&data); //SendMessageToSet(&data, true); @@ -1703,6 +1704,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati } m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o); + SetFallInformation(0, final_z); // if the player is saved before worldportack (at logout for example) // this will be used instead of the current location in SaveToDB diff --git a/src/game/Player.h b/src/game/Player.h index a6915fbf4..fefcaa04d 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1912,6 +1912,11 @@ class MANGOS_DLL_SPEC Player : public Unit MovementInfo m_movementInfo; uint32 m_lastFallTime; float m_lastFallZ; + void SetFallInformation(uint32 time, float z) + { + m_lastFallTime = time; + m_lastFallZ = z; + } bool isMoving() const { return HasUnitMovementFlag(movementFlagsMask); } bool isMovingOrTurning() const { return HasUnitMovementFlag(movementOrTurningFlagsMask); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 6f471f5a9..c526a60bc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6895" + #define REVISION_NR "6896" #endif // __REVISION_NR_H__