mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow place_param2 = 0 node placement predictions (#13787)
The placement prediction value 0 was accidentally ignored and made the clients fall back to automatic rotation based on the node paramtype2 value. This now changes the internal representation to properly indicate the disabled state (e.g. 'nil' in Lua).
This commit is contained in:
parent
833c324498
commit
4ef93fe25f
6 changed files with 36 additions and 9 deletions
|
@ -133,7 +133,9 @@ void read_item_definition(lua_State* L, int index,
|
|||
getstringfield(L, index, "node_placement_prediction",
|
||||
def.node_placement_prediction);
|
||||
|
||||
getintfield(L, index, "place_param2", def.place_param2);
|
||||
int place_param2;
|
||||
if (getintfield(L, index, "place_param2", place_param2))
|
||||
def.place_param2 = rangelim(place_param2, 0, U8_MAX);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue