diff options
| author | Sarah Bradley <git@sarahduck.ca> | 2023-12-18 19:51:26 -0800 |
|---|---|---|
| committer | Sarah Bradley <git@sarahduck.ca> | 2023-12-18 19:51:26 -0800 |
| commit | 4b7966ffda3b6ad34d355148ddccbe2959061730 (patch) | |
| tree | 8be290357abb5d7cf8c72a803f3be63b3e353d7e /OnekoNet.cs | |
| parent | fc3874657348bde6ce7e3fab625c92dfec91baaa (diff) | |
Networked Mice!!
Also combined Spritesheet + Username packets into one UserInfo packet.
Diffstat (limited to 'OnekoNet.cs')
| -rw-r--r-- | OnekoNet.cs | 4 |
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)); } |
