From 70ea5d552e283bd5bce3278cbf3819bd87ba2602 Mon Sep 17 00:00:00 2001 From: Sapier Date: Tue, 15 Dec 2015 00:03:18 +0100 Subject: Add support for limiting rotation of automatic face movement dir entitys --- src/script/common/c_content.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/script/common') 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); } -- cgit v1.2.3