From c947bc03e66948465952b982b6e99a3a8064488a Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 29 Sep 2020 10:55:02 +0200 Subject: [PATCH] MessagePacker.GetId reuses GetId(Type) --- Assets/Mirror/Runtime/MessagePacker.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Mirror/Runtime/MessagePacker.cs b/Assets/Mirror/Runtime/MessagePacker.cs index 40ba073fe..ea624c3c3 100644 --- a/Assets/Mirror/Runtime/MessagePacker.cs +++ b/Assets/Mirror/Runtime/MessagePacker.cs @@ -21,14 +21,14 @@ public static class MessagePacker public static int GetId() where T : IMessageBase { - // paul: 16 bits is enough to avoid collisions - // - keeps the message size small because it gets varinted - // - in case of collisions, Mirror will display an error - return typeof(T).FullName.GetStableHashCode() & 0xFFFF; + return GetId(typeof(T)); } public static int GetId(Type type) { + // paul: 16 bits is enough to avoid collisions + // - keeps the message size small because it gets varinted + // - in case of collisions, Mirror will display an error return type.FullName.GetStableHashCode() & 0xFFFF; }