Skip to content

bugfix(water): Restore shore waves when loading saved games - #3493

Draft
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/water-tracks-after-load
Draft

bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/water-tracks-after-load

Conversation

@bobtista

Copy link
Copy Markdown

WaterTracksRenderSystem::loadTracks opens the .wak file next to the terrain source file. After a save load the terrain source is the map extracted into the save folder. The save embeds only the .map, so the .wak is not found and the shore waves are missing.

Now loadTracks uses the pristine map name when the terrain source is in the save directory, the same way GameLogic finds the map.ini of a saved map. The original map still has to be installed.

Todo:

  • Load a GLA mission 3 save: before the fix Save/md_gla03.wak is not found, after the fix Maps/md_gla03/md_gla03.wak is opened
  • Compare the shore waves in game before and after

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ac293347-29ad-45d2-9093-15e6e70a962f

📥 Commits

Reviewing files that changed from the base of the PR and between 0e6a06c and 837a84b.


📒 Files selected for processing (1)
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.



Walkthrough

loadTracks now uses the pristine map name to locate the .wak file when the terrain source is in the save directory and TheGameState exists. Otherwise, it continues to use the terrain source filename.

Changes

Water track loading

Layer / File(s) Summary
Select filename for saved terrain
Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp
The code includes GameState.h. When the terrain source is in the save directory and TheGameState exists, loadTracks uses the pristine map name to locate the .wak file. Otherwise, it uses the terrain source filename.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 837a8

Saved-game loads now look for shore-wave data alongside the pristine map. No concrete merge-blocking issue is evident; visual confirmation in game remains outstanding.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: restoring shore waves when loading saved games.
Description check Passed The description directly explains the missing .wak file issue, the save-directory condition, the use of the pristine map name, and the expected result.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant