summaryrefslogtreecommitdiff
path: root/OnekoNet.cs
diff options
context:
space:
mode:
authorSarah Bradley <git@sarahduck.ca>2023-12-18 19:51:26 -0800
committerSarah Bradley <git@sarahduck.ca>2023-12-18 19:51:26 -0800
commit4b7966ffda3b6ad34d355148ddccbe2959061730 (patch)
tree8be290357abb5d7cf8c72a803f3be63b3e353d7e /OnekoNet.cs
parentfc3874657348bde6ce7e3fab625c92dfec91baaa (diff)
Networked Mice!!
Also combined Spritesheet + Username packets into one UserInfo packet.
Diffstat (limited to 'OnekoNet.cs')
-rw-r--r--OnekoNet.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/OnekoNet.cs b/OnekoNet.cs
index b7cd595..27d6187 100644
--- a/OnekoNet.cs
+++ b/OnekoNet.cs
@@ -24,11 +24,13 @@ class OnekoNet : Oneko
if (packetType == PacketType.OnekoTargetPosition) TargetPosition = reader.GetVector2();
};
+
+ Client.ServerDisconnected += Dispose;
}
public static void SpawnNetNeko(User user)
{
- if (user.ExchangedData && !NetNekos.ContainsKey(user.Id)) {
+ if (!NetNekos.ContainsKey(user.Id)) {
Bitmap spriteSheet = Bitmap.Deserialize(user.SpriteSheet);
NetNekos.Add(user.Id, new OnekoNet(spriteSheet, user));
}