Skip to content

Instantly share code, notes, and snippets.

minetest.register_entity("entitytest:test", {
sticky = true,
on_activate = function(self, staticdata, dtime_s)
print("on_activate")
self.object:setvelocity({x = 5, y = 0, z = 0})
end,
on_step = function(self, dtime)
print("imma at "..dump(self.object:getpos()))
end,
get_staticdata = function(self)
diff --git a/src/environment.cpp b/src/environment.cpp
index 3ba0a21..abb3cbd 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -992,7 +992,20 @@ void ServerEnvironment::step(float dtime)
floatToInt(player->getPosition(), BS));
players_blockpos.push_back(blockpos);
}
-
+
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 7526e03..9a4ce74 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -30,6 +30,7 @@
#include "scriptapi.h"
#include "genericobject.h"
#include "util/serialize.h"
+#include "map.h"