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

Tweaks for visibility checks regarding vehicles and furniture #77599

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Night-Pryanik
Copy link
Contributor

Summary

Bugfixes "Tweaks for visibility checks regarding vehicles and furniture"

Purpose of change

Visibility checks checked only for coverage value of furniture (if any) on a given tile, even if there's a vehicle there. Flowers, being a furniture and having TRANSPARENT flag, gave 0% concealment. So if there's a flower underneath vehicle's closed doors, quarterpanels or other opaque part, you was able to see right through that part.
изображение
I'm crouching here to narrow the field of view, in order to make the bug more demonstrative, but you have that visibility even when standing.

Also previous checks considered open doors as non-transparent if you were crouching.
изображение

Closes #49381.

Describe the solution

  • Reordered checks for visibility. Made game check for vehicles first, and for furniture second.
  • Added a check for open doors so they no longer block vision while crouching.

Describe alternatives you've considered

None.

Testing

Get vehicle, spawned dandelion under one of its closed doors. Crouched, checked that dandelion no longer makes me see through the door.
Opened door while crouched, checked that I can see through open door.

Additional context

изображение

изображение

@Night-Pryanik Night-Pryanik added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Mechanics: Character / Player Character / Player mechanics labels Nov 5, 2024
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Mechanics: Character / Player Character / Player mechanics Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flowers cause vision discrepancies while crouch-driving
1 participant