mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-13 21:40:50 +00:00
actually call the static constructor of messages
This commit is contained in:
parent
a0655b67eb
commit
d3f6747c30
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using OWML.Common;
|
||||
using QSB.ClientServerStateSync;
|
||||
using QSB.ClientServerStateSync.Events;
|
||||
@ -39,6 +40,9 @@ namespace QSB.Messaging
|
||||
|
||||
_msgTypeToType.Add(msgType, types[i]);
|
||||
_typeToMsgType.Add(types[i], msgType);
|
||||
|
||||
// call static constructor of message if needed
|
||||
RuntimeHelpers.RunClassConstructor(types[i].TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user