mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-31 18:35:20 +01:00
CAO 'node' visual (#15683)
This commit is contained in:
@@ -197,13 +197,17 @@ void ScriptApiEntity::luaentity_GetProperties(u16 id,
|
||||
// Set default values that differ from ObjectProperties defaults
|
||||
prop->hp_max = 10;
|
||||
|
||||
auto *idef = getServer()->idef();
|
||||
|
||||
// Deprecated: read object properties directly
|
||||
// TODO: this should be changed to not read the legacy place
|
||||
// if `initial_properties` exists!
|
||||
logDeprecationForExistingProperties(L, -1, entity_name);
|
||||
read_object_properties(L, -1, self, prop, getServer()->idef());
|
||||
read_object_properties(L, -1, self, prop, idef, true);
|
||||
|
||||
// Read initial_properties
|
||||
lua_getfield(L, -1, "initial_properties");
|
||||
read_object_properties(L, -1, self, prop, getServer()->idef());
|
||||
read_object_properties(L, -1, self, prop, idef);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user