fix: cache new avatar location on teleport

This commit is contained in:
Oliver Booth 2024-02-16 17:04:59 +00:00
parent 850b32c389
commit db5200bd96
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 7 additions and 0 deletions

View File

@ -458,6 +458,13 @@ public sealed partial class VirtualParadiseClient
var location = new Location(world, position, rotation); var location = new Location(world, position, rotation);
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);
} }