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

Addressed light map adjustments resulting in no net change dirtying c… #77193

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

PatrikLundell
Copy link
Contributor

@PatrikLundell PatrikLundell commented Oct 20, 2024

…ache

Summary

None

Purpose of change

Fix #77026, i.e. sleeping near furniture slowing game to a craw.

Describe the solution

Change the light map -> vision map modification to only dirty the cache on a change of the cache state rather than on any modification of the light map data even when the result to the vision cache is not changed.

Describe alternatives you've considered

Testing

  • Slept in a shelter next to a table (the bug report test situation that was slow previously).
  • Slept near a tree (don't know if it was slow before, as make the game faster when player sleep near the tree #73590 tried to address that).
  • Debug changed the time to about 18:00 next day to get daylight, laid down, and waited for 3 hours. The light level changed over time as expected.
  • Debug spawned a church, teleported to it, debug changed time to about 18:00 the next day (daylight waning, again), laid down on the floor (shouldn't matter), waited for 1 hour and saw the light change (at a decent clip). The point here is that the stained windows ought to have slowed down the previous implementation (but haven't verified if that's the case).

There ought to be other situations that should be tested, but I can't come up with any.

Additional context

There is always the risk that I've misunderstood how the caches work or are used.

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) 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 Oct 20, 2024
@Maleclypse Maleclypse merged commit 8f226e5 into CleverRaven:master Oct 22, 2024
29 checks passed
@PatrikLundell PatrikLundell deleted the lightmap branch October 22, 2024 16:14
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Super slow sleeping near the furniture
2 participants