Fix scene object reference serialization in C++ to use correct serializer

#3255
This commit is contained in:
Wojtek Figat
2025-08-30 23:52:54 +02:00
parent 3f7fe635d8
commit 8fdda1a71a
3 changed files with 15 additions and 10 deletions

View File

@@ -80,7 +80,7 @@ class ISerializeModifier;
// Explicit auto-cast for object pointer
#define SERIALIZE_OBJ(name) \
if (Serialization::ShouldSerialize((const ScriptingObject*&)name, other ? &other->name : nullptr)) \
if (Serialization::ShouldSerialize(name, decltype(name)(other ? &other->name : nullptr))) \
{ \
stream.JKEY(#name); \
Serialization::Serialize(stream, (const ScriptingObject*&)name, other ? &other->name : nullptr); \