mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02: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:
@@ -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);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
Reference in New Issue
Block a user