mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 08:08:47 -05:00
Don't corrupt stepheight when setting other properties
This commit is contained in:
parent
264d740c9d
commit
77137a92cf
@ -191,8 +191,8 @@ void read_object_properties(lua_State *L, int index,
|
|||||||
getboolfield(L, -1, "is_visible", prop->is_visible);
|
getboolfield(L, -1, "is_visible", prop->is_visible);
|
||||||
getboolfield(L, -1, "makes_footstep_sound", prop->makes_footstep_sound);
|
getboolfield(L, -1, "makes_footstep_sound", prop->makes_footstep_sound);
|
||||||
getfloatfield(L, -1, "automatic_rotate", prop->automatic_rotate);
|
getfloatfield(L, -1, "automatic_rotate", prop->automatic_rotate);
|
||||||
getfloatfield(L, -1, "stepheight", prop->stepheight);
|
if (getfloatfield(L, -1, "stepheight", prop->stepheight))
|
||||||
prop->stepheight*=BS;
|
prop->stepheight *= BS;
|
||||||
lua_getfield(L, -1, "automatic_face_movement_dir");
|
lua_getfield(L, -1, "automatic_face_movement_dir");
|
||||||
if (lua_isnumber(L, -1)) {
|
if (lua_isnumber(L, -1)) {
|
||||||
prop->automatic_face_movement_dir = true;
|
prop->automatic_face_movement_dir = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user