diff options
| author | megamage <none@none> | 2008-11-22 09:51:35 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-11-22 09:51:35 -0600 |
| commit | f29f2e63332fc7b7150c7e3186633667040c1686 (patch) | |
| tree | 1b595091bf09cbdb4eec6c04582872e564500757 /src/game/Player.cpp | |
| parent | e5239d0170097984f0bd31f587892e1c7d8a013e (diff) | |
*Update to Mangos 6842. Source: Mangos.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8fe5baed6f4..2736534ba07 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1016,6 +1016,13 @@ void Player::Update( uint32 p_time ) CheckExploreSystem(); + /*if(isCharmed()) + { + if(Unit *charmer = GetCharmer()) + if(charmer->GetTypeId() == TYPEID_UNIT && ((Creature*)charmer)->AI()) + ((Creature*)charmer)->AI()->UpdateCharmedAI(this, p_time); + }*/ + // Update items that have just a limited lifetime if (now>m_Last_tick) UpdateItemDuration(uint32(now- m_Last_tick)); @@ -5266,6 +5273,10 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele x = GetPositionX(); y = GetPositionY(); z = GetPositionZ(); + + // group update + if(GetGroup() && (old_x != x || old_y != y)) + SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION); } // code block for underwater state update @@ -5273,10 +5284,6 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele CheckExploreSystem(); - // group update - if(GetGroup()) - SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION); - return true; } |
