1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-09 23:35:41 +00:00

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

View File

@ -457,14 +457,8 @@ public sealed partial class VirtualParadiseClient
: await GetWorldAsync(worldName).ConfigureAwait(false))!; : await GetWorldAsync(worldName).ConfigureAwait(false))!;
var location = new Location(world, position, rotation); var location = new Location(world, position, rotation);
CurrentAvatar!.Location = location;
VirtualParadiseAvatar avatar = GetAvatar(session)!; VirtualParadiseAvatar avatar = GetAvatar(session)!;
avatar.Location = location;
if (world != CurrentWorld)
{
_avatars.TryRemove(session, out _);
}
var args = new TeleportedEventArgs(avatar, location); var args = new TeleportedEventArgs(avatar, location);
_teleported.OnNext(args); _teleported.OnNext(args);
} }