summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index d6baa1580..87e6466a9 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -1107,14 +1107,14 @@ void PlayerSAO::step(float dtime, bool send_recommended)
if (!send_recommended)
return;
- // If the object is attached client-side, don't waste bandwidth sending its
- // position or rotation to clients.
- if (m_position_not_sent && !isAttached()) {
+ if (m_position_not_sent) {
m_position_not_sent = false;
float update_interval = m_env->getSendRecommendedInterval();
v3f pos;
- if (isAttached()) // Just in case we ever do send attachment position too
- pos = m_env->getActiveObject(m_attachment_parent_id)->getBasePosition();
+ // When attached, the position is only sent to clients where the
+ // parent isn't known
+ if (isAttached())
+ pos = m_last_good_position;
else
pos = m_base_position;