Skip to content

Fix render burn#926

Merged
notfood merged 2 commits into
rwmt:devfrom
MhaWay:fix-render-burn
May 19, 2026
Merged

Fix render burn#926
notfood merged 2 commits into
rwmt:devfrom
MhaWay:fix-render-burn

Conversation

@MhaWay
Copy link
Copy Markdown
Contributor

@MhaWay MhaWay commented May 18, 2026

Summary

Fix render burn during hosting by making reload cache usage explicit.

What changed

  • nest the SaveLoad cache handling in a switch case
  • default to no cache loading when SaveAndReload is called without a mode
  • keep cache loading only for the explicit in-game reload path
  • avoid loading render caches in hosting/bootstrap flows where they were being applied incorrectly

Why

The render burn was caused by loading the render/world cache in cases where the game was creating or hosting a session, not performing the in-game reload path that actually benefits from those caches.

Copilot AI review requested due to automatic review settings May 18, 2026 00:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes render-cache reuse during save-and-reload explicit, so most reloads regenerate render state while join-point creation can still opt into cache reuse.

Changes:

  • Adds SaveReloadCacheMode and a cacheMode parameter to SaveLoad.SaveAndReload.
  • Clears render/world cache patch state by default, while preserving the prior cache-copy behavior when explicitly requested.
  • Updates async join-point creation to request cached reload behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Source/Client/Saving/SaveLoad.cs Adds cache-mode selection and applies/clears reload cache patch state accordingly.
Source/Client/AsyncTime/AsyncWorldTimeComp.cs Uses cached reload mode when creating and sending join-point snapshots.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Source/Client/Saving/SaveLoad.cs Outdated
public static class SaveLoad
{
public static TempGameData SaveAndReload()
public static TempGameData SaveAndReload(SaveReloadCacheMode cacheMode = SaveReloadCacheMode.None)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a boolean instead, I don't see any scenario where the cache is anything but yes or no.

TempGameData SaveAndReload(bool cache = false)

@MhaWay MhaWay requested a review from notfood May 18, 2026 10:25
@notfood notfood merged commit cbf907f into rwmt:dev May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants