mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
use default int32 reader
This commit is contained in:
parent
a5d4f46980
commit
609480208c
@ -157,7 +157,7 @@ static MethodDefinition GenerateArrayReadFunc(TypeReference variable, int recurs
|
|||||||
|
|
||||||
// int length = reader.ReadPackedInt32();
|
// int length = reader.ReadPackedInt32();
|
||||||
worker.Append(worker.Create(OpCodes.Ldarg_0));
|
worker.Append(worker.Create(OpCodes.Ldarg_0));
|
||||||
worker.Append(worker.Create(OpCodes.Call, Weaver.NetworkReaderReadPackedInt32));
|
worker.Append(worker.Create(OpCodes.Call, GetReadFunc(Weaver.int32Type)));
|
||||||
worker.Append(worker.Create(OpCodes.Stloc_0));
|
worker.Append(worker.Create(OpCodes.Stloc_0));
|
||||||
|
|
||||||
// if (length < 0) {
|
// if (length < 0) {
|
||||||
@ -256,7 +256,7 @@ static MethodDefinition GenerateArraySegmentReadFunc(TypeReference variable, int
|
|||||||
|
|
||||||
// int length = reader.ReadPackedInt32();
|
// int length = reader.ReadPackedInt32();
|
||||||
worker.Append(worker.Create(OpCodes.Ldarg_0));
|
worker.Append(worker.Create(OpCodes.Ldarg_0));
|
||||||
worker.Append(worker.Create(OpCodes.Call, Weaver.NetworkReaderReadPackedInt32));
|
worker.Append(worker.Create(OpCodes.Call, GetReadFunc(Weaver.int32Type)));
|
||||||
worker.Append(worker.Create(OpCodes.Stloc_0));
|
worker.Append(worker.Create(OpCodes.Stloc_0));
|
||||||
|
|
||||||
// T[] array = new int[length]
|
// T[] array = new int[length]
|
||||||
|
@ -85,7 +85,6 @@ class Weaver
|
|||||||
public static MethodReference NetworkServerGetLocalClientActive;
|
public static MethodReference NetworkServerGetLocalClientActive;
|
||||||
public static MethodReference NetworkClientGetActive;
|
public static MethodReference NetworkClientGetActive;
|
||||||
public static MethodReference getBehaviourIsServer;
|
public static MethodReference getBehaviourIsServer;
|
||||||
public static MethodReference NetworkReaderReadPackedInt32;
|
|
||||||
public static MethodReference NetworkReaderReadPackedUInt32;
|
public static MethodReference NetworkReaderReadPackedUInt32;
|
||||||
public static MethodReference NetworkWriterWritePackedUInt64;
|
public static MethodReference NetworkWriterWritePackedUInt64;
|
||||||
public static MethodReference NetworkWriterWritePackedInt32;
|
public static MethodReference NetworkWriterWritePackedInt32;
|
||||||
@ -318,7 +317,6 @@ static void SetupTargetTypes()
|
|||||||
NetworkServerGetLocalClientActive = Resolvers.ResolveMethod(NetworkServerType, CurrentAssembly, "get_localClientActive");
|
NetworkServerGetLocalClientActive = Resolvers.ResolveMethod(NetworkServerType, CurrentAssembly, "get_localClientActive");
|
||||||
NetworkClientGetActive = Resolvers.ResolveMethod(NetworkClientType, CurrentAssembly, "get_active");
|
NetworkClientGetActive = Resolvers.ResolveMethod(NetworkClientType, CurrentAssembly, "get_active");
|
||||||
|
|
||||||
NetworkReaderReadPackedInt32 = Resolvers.ResolveMethod(NetworkReaderType, CurrentAssembly, "ReadPackedInt32");
|
|
||||||
NetworkReaderReadPackedUInt32 = Resolvers.ResolveMethod(NetworkReaderType, CurrentAssembly, "ReadPackedUInt32");
|
NetworkReaderReadPackedUInt32 = Resolvers.ResolveMethod(NetworkReaderType, CurrentAssembly, "ReadPackedUInt32");
|
||||||
NetworkReaderReadPackedUInt64 = Resolvers.ResolveMethod(NetworkReaderType, CurrentAssembly, "ReadPackedUInt64");
|
NetworkReaderReadPackedUInt64 = Resolvers.ResolveMethod(NetworkReaderType, CurrentAssembly, "ReadPackedUInt64");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user