UNetBehaviourProcessor WriteMessage comments added to make this more obvious in the future.

This commit is contained in:
vis2k 2018-07-26 12:51:36 +02:00
parent 4b339931c5
commit 2148351799

View File

@ -117,7 +117,7 @@ static void WriteCreateWriter(ILProcessor worker)
static void WriteMessageSize(ILProcessor worker)
{
//write size
worker.Append(worker.Create(OpCodes.Ldloc_0));
worker.Append(worker.Create(OpCodes.Ldloc_0)); // load 'writer.'
worker.Append(worker.Create(OpCodes.Ldc_I4_0));
worker.Append(worker.Create(OpCodes.Callvirt, Weaver.NetworkWriterWriteInt16));
}
@ -125,7 +125,7 @@ static void WriteMessageSize(ILProcessor worker)
static void WriteMessageId(ILProcessor worker, int msgId)
{
// write msg id
worker.Append(worker.Create(OpCodes.Ldloc_0));
worker.Append(worker.Create(OpCodes.Ldloc_0)); // load 'writer.'
worker.Append(worker.Create(OpCodes.Ldc_I4, msgId));
worker.Append(worker.Create(OpCodes.Conv_U2));
worker.Append(worker.Create(OpCodes.Callvirt, Weaver.NetworkWriterWriteInt16));