fix #38708 vision transparency cache #38712
Merged
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.
Summary
SUMMARY: None
Purpose of change
Fixes #38708. After #38280
vision_transparency_cache
was broken logic: it is copying fromtransparency_cache
beforedo_vehicle_caching
change it. With zlevels on, the problem is imperceptible in game, becausevision_transparency_cache
was copied 19 times more in cycle and overwrites the wrong value. If zlevels off, game have issue #38708.Describe the solution
Relocate
build_vision_transparency_cache
afterdo_vehicle_caching
and call it only once (no need to rebuild it 20 times in cycle with zlevels on).Describe alternatives you've considered
No need to alternatives. All works fine. I think this is what the author of #38280 intended.
Testing
Try to reproduce #38708 (with zlevels off).
Additional context