add comment

This commit is contained in:
vis2k 2020-01-08 12:16:39 +01:00
parent a71ecdba4a
commit aafe387899

View File

@ -449,6 +449,7 @@ void DeserializeField(FieldDefinition syncVar, ILProcessor serWorker, MethodDefi
return; return;
} }
// [SyncVar] GameObject/NetworkIdentity?
if (syncVar.FieldType.FullName == Weaver.gameObjectType.FullName || if (syncVar.FieldType.FullName == Weaver.gameObjectType.FullName ||
syncVar.FieldType.FullName == Weaver.NetworkIdentityType.FullName) syncVar.FieldType.FullName == Weaver.NetworkIdentityType.FullName)
{ {
@ -487,6 +488,7 @@ void DeserializeField(FieldDefinition syncVar, ILProcessor serWorker, MethodDefi
serWorker.Append(serWorker.Create(OpCodes.Ldloc, tmpValue)); serWorker.Append(serWorker.Create(OpCodes.Ldloc, tmpValue));
serWorker.Append(serWorker.Create(OpCodes.Stfld, netIdField)); serWorker.Append(serWorker.Create(OpCodes.Stfld, netIdField));
} }
// [SyncVar] int/float/struct/etc.?
else else
{ {
MethodReference readFunc = Readers.GetReadFunc(syncVar.FieldType); MethodReference readFunc = Readers.GetReadFunc(syncVar.FieldType);