fix: fix incorrect interpretation of VP_EVENT_TELEPORT

This commit is contained in:
Oliver Booth 2024-02-16 17:44:42 +00:00
parent d7e3ebf582
commit 3047c89fdc
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 2 additions and 8 deletions

View File

@ -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);
}