summaryrefslogtreecommitdiff
path: root/OnekoNet.cs
diff options
context:
space:
mode:
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));
}