mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Add option to disable backface culling for models
- Disabled by default (except players) - Fixes #2984
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user