summaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorSapier <sapier@does.not.have.an.email>2015-12-15 00:03:18 +0100
committerSapier <sapier AT gmx dot net>2015-12-19 17:00:36 +0100
commit70ea5d552e283bd5bce3278cbf3819bd87ba2602 (patch)
treeee1a61eb38e1d29696dd71ed240625933176d939 /src/script/common
parent06632205d8765b5417c36df798617721bab0d02f (diff)
downloadminetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.tar.gz
minetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.tar.bz2
minetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.zip
Add support for limiting rotation of automatic face movement dir entitys
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 4d277ec59..f9370c4dc 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -201,6 +201,7 @@ void read_object_properties(lua_State *L, int index,
}
lua_pop(L, 1);
getboolfield(L, -1, "backface_culling", prop->backface_culling);
+
getstringfield(L, -1, "nametag", prop->nametag);
lua_getfield(L, -1, "nametag_color");
if (!lua_isnil(L, -1)) {
@@ -208,6 +209,11 @@ void read_object_properties(lua_State *L, int index,
if (read_color(L, -1, &color))
prop->nametag_color = color;
}
+
+ lua_getfield(L, -1, "automatic_face_movement_max_rotation_per_sec");
+ if (lua_isnumber(L, -1)) {
+ prop->automatic_face_movement_max_rotation_per_sec = luaL_checknumber(L, -1);
+ }
lua_pop(L, 1);
}