Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #38708 vision transparency cache #38712

Merged
merged 1 commit into from
Mar 12, 2020
Merged

fix #38708 vision transparency cache #38712

merged 1 commit into from
Mar 12, 2020

Conversation

akirashirosawa
Copy link
Contributor

@akirashirosawa akirashirosawa commented Mar 11, 2020

Summary

SUMMARY: None

Purpose of change

Fixes #38708. After #38280 vision_transparency_cache was broken logic: it is copying from transparency_cache before do_vehicle_caching change it. With zlevels on, the problem is imperceptible in game, because vision_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 after do_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).

  1. Move around some heavy vehicle with boards - in some position character can see through it.
  2. Open or close vehicle door make vehicle transparent - character can see through it.

Additional context

Relocate build_vision_transparency_cache after do_vehicle_caching and call it only once (no need to rebuild it 20 times in cycle with zlevels on).
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) labels Mar 12, 2020
@ZhilkinSerg ZhilkinSerg merged commit f1dfe4f into CleverRaven:master Mar 12, 2020
@akirashirosawa akirashirosawa deleted the fix-vision-transparency-cache branch March 13, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vehicle becomes transparent when moving around or when opening/close a vehicle door
2 participants