mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55: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:
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include "itemgroup.h"
|
||||
#include "sound.h"
|
||||
@@ -87,7 +88,7 @@ struct ItemDefinition
|
||||
// Server will update the precise end result a moment later.
|
||||
// "" = no prediction
|
||||
std::string node_placement_prediction;
|
||||
u8 place_param2;
|
||||
std::optional<u8> place_param2;
|
||||
|
||||
/*
|
||||
Some helpful methods
|
||||
|
Reference in New Issue
Block a user