diff options
author | Ciaran Gultnieks <ciaran@ciarang.com> | 2014-11-17 21:17:36 +0000 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2014-11-26 20:02:48 +0100 |
commit | 77137a92cfc221b885b8eae68f13cede604fcac7 (patch) | |
tree | 416a298526bb9228b8f5f4559e74307fa8781e40 /src/script/common | |
parent | 264d740c9de7834d8a5bcdc2c1ee3df828d9cdaa (diff) | |
download | minetest-77137a92cfc221b885b8eae68f13cede604fcac7.tar.gz minetest-77137a92cfc221b885b8eae68f13cede604fcac7.tar.bz2 minetest-77137a92cfc221b885b8eae68f13cede604fcac7.zip |
Don't corrupt stepheight when setting other properties
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 1972c40e0..bf4da41ec 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -191,8 +191,8 @@ void read_object_properties(lua_State *L, int index, getboolfield(L, -1, "is_visible", prop->is_visible); getboolfield(L, -1, "makes_footstep_sound", prop->makes_footstep_sound); getfloatfield(L, -1, "automatic_rotate", prop->automatic_rotate); - getfloatfield(L, -1, "stepheight", prop->stepheight); - prop->stepheight*=BS; + if (getfloatfield(L, -1, "stepheight", prop->stepheight)) + prop->stepheight *= BS; lua_getfield(L, -1, "automatic_face_movement_dir"); if (lua_isnumber(L, -1)) { prop->automatic_face_movement_dir = true; |