Do not process vision for remote players when they are between dungeon levels #7755
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the remote player transitions from their current level to the loading screen, the local client...
CMD_NEWLVL
player.setLevel()
to updateplayer.plrlevel
player._pLvlChanging
to trueWhen the remote player transitions from the loading screen to their new level, the local client...
CMD_PLAYER_JOINLEVEL
player._pLvlChanging
to falseStartStand()
which callsFixPlayerLocation()
to update the player's positionActivateVision()
on the remote player instanceWhen the local player transitions from their current level to the loading screen after processing
CMD_NEWLVL
but before processingCMD_PLAYER_JOINLEVEL
, theplayer.isOnActiveLevel()
function will return true for the remote player becauseplayer.setLevel()
was already called, but the remote player's location won't have been updated becauseFixPlayerLocation()
hasn't been called.This means that when
LoadGameLevelLightVision()
callsProcessVisionList()
, it will callDoVision()
on the remote player in the wrong location. Since we know the local client will eventually callActivateVision()
on the remote player instance whenCMD_PLAYER_JOINLEVEL
is processed, it's okay to keep the remote player's vision deactivated whileplayer._pLvlChanging
is true.This resolves #7745