@@ -1077,29 +1077,10 @@ private unsafe void ApplyEntityDelta(
10771077 if ( field . IsPredicted )
10781078 RefMagic . CopyBlock ( predictedData + field . PredictedOffset , fieldData , field . Size ) ;
10791079
1080- if ( field . OnSync != null && insideNewRPC )
1081- {
1082- if ( ( field . OnSyncFlags & BindOnChangeFlags . ExecuteOnNew ) != 0 )
1083- {
1084- //execute immediately using temp data buffer inside SetFromAndSync
1085- field . TypeProcessor . SetFromAndSync ( target , offset , fieldData , field . OnSync ) ;
1086- }
1087- // call sync calls on first sync in new because constructed will be empty (to reduce datasize)
1088- if ( firstSync && ( field . OnSyncFlags & BindOnChangeFlags . ExecuteOnSync ) != 0 )
1089- {
1090- if ( field . TypeProcessor . SetFromAndSync ( target , offset , fieldData ) )
1091- _syncCalls [ _syncCallsCount ++ ] = new SyncCallInfo ( entity , readerPosition , i , ! hasData ) ;
1092- }
1093- //else skip set? because will be triggered in OnConstructed
1094- }
1095- else if ( field . OnSync != null && ( field . OnSyncFlags & BindOnChangeFlags . ExecuteOnSync ) != 0 && field . TypeProcessor . SetFromAndSync ( target , offset , fieldData ) )
1096- {
1080+ if ( field . OnSync != null && ( field . OnSyncFlags & BindOnChangeFlags . ExecuteOnSync ) != 0 && field . TypeProcessor . SetFromAndSync ( target , offset , fieldData ) )
10971081 _syncCalls [ _syncCallsCount ++ ] = new SyncCallInfo ( entity , readerPosition , i , ! hasData ) ;
1098- }
10991082 else
1100- {
11011083 field . TypeProcessor . SetFrom ( target , offset , fieldData ) ;
1102- }
11031084
11041085 if ( hasData )
11051086 readerPosition += field . IntSize ;
0 commit comments