mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add option to disable backface culling for models
- Disabled by default (except players) - Fixes #2984
This commit is contained in:
parent
6907c3e40a
commit
50ba7e114d
5 changed files with 15 additions and 4 deletions
|
@ -197,6 +197,7 @@ void read_object_properties(lua_State *L, int index,
|
|||
prop->automatic_face_movement_dir_offset = 0.0;
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
getboolfield(L, -1, "backface_culling", prop->backface_culling);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -255,6 +256,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop)
|
|||
else
|
||||
lua_pushboolean(L, false);
|
||||
lua_setfield(L, -2, "automatic_face_movement_dir");
|
||||
lua_pushboolean(L, prop->backface_culling);
|
||||
lua_setfield(L, -2, "backface_culling");
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -1231,4 +1234,3 @@ void read_json_value(lua_State *L, Json::Value &root, int index, u8 recursion)
|
|||
}
|
||||
lua_pop(L, 1); // Pop value
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue