Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee51077

Browse files
committed
Merge branch 'replication_hashing_fix' ofhttps://github.com/VitaminCpp/FlaxEngine into VitaminCpp-replication_hashing_fix
2 parents950e958 +56beca0 commitee51077

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎Source/Engine/Networking/NetworkReplicator.cpp‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ struct NetworkReplicatedObject
152152

153153
booloperator==(const NetworkReplicatedObject& other)const
154154
{
155-
returnObject == other.Object;
155+
returnObjectId == other.ObjectId;
156156
}
157157

158158
booloperator==(const ScriptingObject* other)const
159159
{
160-
returnObject== other;
160+
returnother && ObjectId== other->GetID();
161161
}
162162

163163
booloperator==(const Guid& other)const
@@ -176,6 +176,11 @@ inline uint32 GetHash(const NetworkReplicatedObject& key)
176176
returnGetHash(key.ObjectId);
177177
}
178178

179+
inline uint32GetHash(const ScriptingObject* key)
180+
{
181+
return key ?GetHash(key->GetID()) :0;
182+
}
183+
179184
structSerializer
180185
{
181186
NetworkReplicator::SerializeFunc Methods[2];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp