From: sfan5 Date: Wed, 8 Jun 2022 17:33:46 +0000 (+0200) Subject: Move f1000 sanitizing to the places that still use this type X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=137eef6590205b7bcdf5273221bc22c17b218f6e;hp=b204655081f495c9d45fdf7d49d203e910dafc7a;p=minetest.git Move f1000 sanitizing to the places that still use this type --- diff --git a/src/player.h b/src/player.h index cc1357010..beca82f66 100644 --- a/src/player.h +++ b/src/player.h @@ -141,7 +141,6 @@ class Player void setSpeed(v3f speed) { - clampToF1000(speed); m_speed = speed; } 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<setDirty(true); diff --git a/src/staticobject.cpp b/src/staticobject.cpp index 1160ec68f..f92995d0b 100644 --- a/src/staticobject.cpp +++ b/src/staticobject.cpp @@ -28,12 +28,12 @@ StaticObject::StaticObject(const ServerActiveObject *s_obj, const v3f &pos_): s_obj->getStaticData(&data); } -void StaticObject::serialize(std::ostream &os) +void StaticObject::serialize(std::ostream &os) const { // type writeU8(os, type); // pos - writeV3F1000(os, pos); + writeV3F1000(os, clampToF1000(pos)); // data os<