Skip to content

Commit

Permalink
? added for the invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
dooly123 committed Jan 11, 2025
1 parent 292a939 commit b075ca5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static void HandleServerAvatarDataMessage(LiteNetLib.NetPacketReader read
}
else
{
player.Player.BasisAvatar.OnNetworkMessageReceived.Invoke(serverAvatarDataMessage.playerIdMessage.playerID, output.messageIndex, output.payload, Method);
player.Player.BasisAvatar.OnNetworkMessageReceived?.Invoke(serverAvatarDataMessage.playerIdMessage.playerID, output.messageIndex, output.payload, Method);
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void DecompressAndProcessAvatar(BasisNetworkReceiver baseReceiver,
for (int Index = 0; Index < Count; Index++)
{
AdditionalAvatarData Data = syncMessage.avatarSerialization.AdditionalAvatarDatas[Index];
baseReceiver.Player.BasisAvatar.OnNetworkMessageReceived.Invoke(PlayerId, Data.messageIndex, Data.array, LiteNetLib.DeliveryMethod.Sequenced);
baseReceiver.Player.BasisAvatar.OnNetworkMessageReceived?.Invoke(PlayerId, Data.messageIndex, Data.array, LiteNetLib.DeliveryMethod.Sequenced);
}
}
}
Expand Down Expand Up @@ -84,7 +84,7 @@ public static void DecompressAndProcessAvatar(BasisNetworkReceiver baseReceiver,
for (int Index = 0; Index < Count; Index++)
{
AdditionalAvatarData Data = syncMessage.AdditionalAvatarDatas[Index];
baseReceiver.Player.BasisAvatar.OnNetworkMessageReceived.Invoke(PlayerId, Data.messageIndex, Data.array, LiteNetLib.DeliveryMethod.Sequenced);
baseReceiver.Player.BasisAvatar.OnNetworkMessageReceived?.Invoke(PlayerId, Data.messageIndex, Data.array, LiteNetLib.DeliveryMethod.Sequenced);
}
}
}
Expand Down

0 comments on commit b075ca5

Please sign in to comment.