From 3047c89fdcf2022645f031b55bb17490cd458a09 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 16 Feb 2024 17:44:42 +0000 Subject: [PATCH] fix: fix incorrect interpretation of VP_EVENT_TELEPORT --- VpSharp/src/VirtualParadiseClient.NativeEvents.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/VpSharp/src/VirtualParadiseClient.NativeEvents.cs b/VpSharp/src/VirtualParadiseClient.NativeEvents.cs index 7c3d96f..e45ef4b 100644 --- a/VpSharp/src/VirtualParadiseClient.NativeEvents.cs +++ b/VpSharp/src/VirtualParadiseClient.NativeEvents.cs @@ -457,14 +457,8 @@ public sealed partial class VirtualParadiseClient : await GetWorldAsync(worldName).ConfigureAwait(false))!; var location = new Location(world, position, rotation); - VirtualParadiseAvatar avatar = GetAvatar(session)!; - avatar.Location = location; - - if (world != CurrentWorld) - { - _avatars.TryRemove(session, out _); - } - + CurrentAvatar!.Location = location; + VirtualParadiseAvatar avatar = GetAvatar(session)!; var args = new TeleportedEventArgs(avatar, location); _teleported.OnNext(args); }