fix (core): Prevent Forced UpdateObjectVisibility Before in World (#11730)
fix (Core): Prevent Forced UpdateObjectVisibility Before in World
TC Cherry Pick: 38dc5667ba
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Jurgis <326232+chemicstry@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Jurgis <326232+chemicstry@users.noreply.github.com>
This commit is contained in:
parent
06a62538cf
commit
11f151a962
1 changed files with 4 additions and 0 deletions
|
|
@ -1548,6 +1548,10 @@ void Player::UpdateVisibilityForPlayer(bool mapChange)
|
|||
|
||||
void Player::UpdateObjectVisibility(bool forced, bool fromUpdate)
|
||||
{
|
||||
// Prevent updating visibility if player is not in world (example: LoadFromDB sets drunkstate which updates invisibility while player is not in map)
|
||||
if (!IsInWorld())
|
||||
return;
|
||||
|
||||
if (!forced)
|
||||
AddToNotify(NOTIFY_VISIBILITY_CHANGED);
|
||||
else if (!isBeingLoaded())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue