mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-10 02:55:41 +00:00
fix: cache new avatar location on teleport
This commit is contained in:
parent
850b32c389
commit
db5200bd96
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user