]> git.lizzy.rs Git - minetest.git/blobdiff - src/staticobject.cpp
Move f1000 sanitizing to the places that still use this type
[minetest.git] / src / staticobject.cpp
index 1160ec68f1c01dee8aa3c6791eec6ecf65ae09fc..f92995d0ba1cf28191c463da0aa060447e92d374 100644 (file)
@@ -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<<serializeString16(data);
 }