mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 14:48:48 +00:00
fix: fix bug where teleported avatars would lose their world reference
This commit is contained in:
parent
f6991eb697
commit
850b32c389
@ -443,7 +443,9 @@ public sealed class VirtualParadiseAvatar : IEquatable<VirtualParadiseAvatar>
|
||||
}
|
||||
}
|
||||
|
||||
Location = new Location(new VirtualParadiseWorld(_client, world), position, rotation);
|
||||
VirtualParadiseWorld? updatedWorld = isNewWorld ? await _client.GetWorldAsync(world) : Location.World;
|
||||
updatedWorld ??= new VirtualParadiseWorld(_client, world);
|
||||
Location = new Location(updatedWorld, position, rotation);
|
||||
// ReSharper restore InconsistentlySynchronizedField
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user