mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-30 12:32:55 +00:00
dont send message for non serializable stuff
This commit is contained in:
parent
eaa2f4578a
commit
e557cadba0
@ -55,6 +55,11 @@ public class RequestStateResyncMessage : QSBMessage
|
||||
// Initial sync of all custom data from APIs
|
||||
foreach (var kvp in QSBPlayerManager.LocalPlayer._customData)
|
||||
{
|
||||
if (!kvp.Value.GetType().IsSerializable)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
new AddonCustomDataSyncMessage(QSBPlayerManager.LocalPlayerId, kvp.Key, kvp.Value) { To = From }.Send();
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ public partial class PlayerInfo
|
||||
{
|
||||
_customData[key] = data;
|
||||
|
||||
if (!QSBPatch.Remote)
|
||||
if (!QSBPatch.Remote && typeof(T).IsSerializable)
|
||||
{
|
||||
new AddonCustomDataSyncMessage(PlayerId, key, data).Send();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user