Merge branch 'VitaminCpp-replication_hashing_fix'

This commit is contained in:
Wojtek Figat
2025-12-14 22:48:09 +01:00

View File

@@ -152,12 +152,12 @@ struct NetworkReplicatedObject
bool operator==(const NetworkReplicatedObject& other) const
{
return Object == other.Object;
return ObjectId == other.ObjectId;
}
bool operator==(const ScriptingObject* other) const
{
return Object == other;
return other && ObjectId == other->GetID();
}
bool operator==(const Guid& other) const
@@ -176,6 +176,11 @@ inline uint32 GetHash(const NetworkReplicatedObject& key)
return GetHash(key.ObjectId);
}
inline uint32 GetHash(const ScriptingObject* key)
{
return key ? GetHash(key->GetID()) : 0;
}
struct Serializer
{
NetworkReplicator::SerializeFunc Methods[2];