Skip to content

Fix Sonar Pulse multiplayer shroud desync - #22623

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
snowyukitty:fix/sonar-pulse-owner-shroud-reviewed
Oct 9, 2026
Merged

PunkPun merged 1 commit into
OpenRA:bleedfrom
snowyukitty:fix/sonar-pulse-owner-shroud-reviewed

Conversation

@snowyukitty

@snowyukitty snowyukitty commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Sonar Pulse can desync when its owner has explored the target water but another player has not. SpawnActorPower.Validate uses World.ShroudObscures, which depends on each client's local RenderPlayer, so clients can disagree about whether to spawn the sonar actor.

Use the current power actor owner's exploration instead. Activation, target orders and cursor selection already share this validation method. Map bounds, terrain restrictions and the AllowUnderShroud bypass retain their existing behavior.

Fixes #22621.

Validation against b6fc03fc:

  • make check, make tests, make TREAT_WARNINGS_AS_ERRORS=true test and make check-scripts passed on the originally tested candidate, including all four default mods' configuration and script checks. NUnit: 508 passed, two existing PNG tests skipped. The engine source is unchanged in this update.
  • Automated two-client Red Alert UI runs clicked the Sonar icon and explored water using normal mouse input and network orders. The baseline spawned sonar on one client only and both detected desync; the patched clients both spawned sonar, retained matching world hashes and continued the match. No activation/order injection or shroud override was used in this UI test.
  • Separate automated checks covered owner/viewer/observer views, unexplored water, land, out-of-map targets and AllowUnderShroud behavior.

I reviewed the baseline and patched UI recordings. The game inputs were automated; this was scoped human visual review, rather than a manually played match. The UI fixture supplies a ready support-power proxy and natural camera exploration, so it does not cover the original spy-infiltration and full charge-time sequence. UI runs used isolated Linux clients; Windows/macOS gameplay was not tested.

Proposed changelog: Fixed a multiplayer desync when using Sonar Pulse on water that another player has not explored.

@pchote

pchote commented Oct 4, 2026

Copy link
Copy Markdown
Member

This PR appears to have been created using AI. AUTHORS records direct human authorship, and changes created using AI do are not valid for inclusion. Please remove that change if you would like this to be considered for merging.

@snowyukitty

Copy link
Copy Markdown
Contributor Author

Removed the AUTHORS addition in 228b8bd. The PR now contains only the SpawnActorPower fix.

@PunkPun
PunkPun force-pushed the fix/sonar-pulse-owner-shroud-reviewed branch from 228b8bd to 9dcf583 Compare October 9, 2026 13:33

@PunkPun PunkPun left a comment

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.

Makes sense

@PunkPun
PunkPun merged commit 0cbd48f into OpenRA:bleed Oct 9, 2026
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.

Sonar Pulse desyncs when target is under another player's shroud

3 participants