diff options
author | Machiavelli <none@none> | 2010-06-26 13:41:36 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-06-26 13:41:36 +0200 |
commit | d2553a138afcbda3ad24f7cbcc9e1202831bb049 (patch) | |
tree | 27f00093f129f2108046e527ef6b8179c1d643c9 /src | |
parent | 26da69a5444a15e5c1f8b1b57316ef846af969d4 (diff) |
Use valid coördinates for Unit::UpdateUnderWaterState instead of raw coördinates. Fixes another potential crash related to vmaps.
Updates issue #2748
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9dfb0ed3f57..5093ec518a6 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -6207,7 +6207,9 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION); // code block for underwater state update - UpdateUnderwaterState(GetMap(), x, y, z); + // Unit::SetPosition() checks for validity and updates our coordinates + // so we re-fetch them instead of using "raw" coordinates from function params + UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ()); if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE)) GetSession()->SendCancelTrade(); |