aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/luaentity_sao.cpp2
-rw-r--r--src/server/player_sao.cpp6
2 files changed, 1 insertions, 7 deletions
diff --git a/src/server/luaentity_sao.cpp b/src/server/luaentity_sao.cpp
index a0a8aede0..ab4a9e3f2 100644
--- a/src/server/luaentity_sao.cpp
+++ b/src/server/luaentity_sao.cpp
@@ -290,7 +290,7 @@ void LuaEntitySAO::getStaticData(std::string *result) const
os<<serializeString32(m_init_state);
}
writeU16(os, m_hp);
- writeV3F1000(os, m_velocity);
+ writeV3F1000(os, clampToF1000(m_velocity));
// yaw
writeF1000(os, m_rotation.Y);
diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp
index c5f6d0a24..a58a0397f 100644
--- a/src/server/player_sao.cpp
+++ b/src/server/player_sao.cpp
@@ -321,12 +321,6 @@ std::string PlayerSAO::generateUpdatePhysicsOverrideCommand() const
void PlayerSAO::setBasePosition(v3f position)
{
- // It's not entirely clear which parts of the network protocol still use
- // v3f1000, but the script API enforces its bound on all float vectors
- // (maybe it shouldn't?). For that reason we need to make sure the position
- // isn't ever set to values that fail this restriction.
- clampToF1000(position);
-
if (m_player && position != m_base_position)
m_player->setDirty(true);