]> git.lizzy.rs Git - minetest.git/blobdiff - src/content_sao.cpp
Vary ore sheet y position by noise
[minetest.git] / src / content_sao.cpp
index 718a42dffcff479eea9eb3fa06cd737789a6b85d..d7afc31d80d135154bde34bc79edecbb7fd1bfea 100644 (file)
@@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "genericobject.h"
 #include "util/serialize.h"
 
-core::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
+std::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
 
 /*
        DummyLoadSAO
@@ -1230,6 +1230,20 @@ void PlayerSAO::moveTo(v3f pos, bool continuous)
        m_moved = true;
 }
 
+void PlayerSAO::setYaw(float yaw)
+{
+       m_player->setYaw(yaw);
+       // Force change on client
+       m_moved = true;
+}
+
+void PlayerSAO::setPitch(float pitch)
+{
+       m_player->setPitch(pitch);
+       // Force change on client
+       m_moved = true;
+}
+
 int PlayerSAO::punch(v3f dir,
        const ToolCapabilities *toolcap,
        ServerActiveObject *puncher,