aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp15
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;
}