Skip to content

Conversation

@Stubbjax
Copy link

Fixes #1644

This change fixes an issue introduced by #1543 which used local drawable state that was also used by game logic paths, leading to desynchronised behaviour.

@Stubbjax Stubbjax self-assigned this Sep 28, 2025
@Stubbjax Stubbjax added Blocker Severity: Minor < Major < Critical < Blocker Bug Something is not working right, typically is user facing Gen Relates to Generals ZH Relates to Zero Hour ThisProject The issue was introduced by this project, or this task is specific to this project labels Sep 28, 2025
@xezon
Copy link

xezon commented Sep 28, 2025

This now fails the Replay Check, so is still not right.

@Stubbjax
Copy link
Author

This now fails the Replay Check, so is still not right.

Ah, the player index might need to be the local player as it's from their perspective.

@Stubbjax Stubbjax marked this pull request as draft September 28, 2025 11:40
@Stubbjax Stubbjax force-pushed the fix-shrouded-building-placement branch from a34b0f2 to 9cf4866 Compare September 28, 2025 11:41
@Stubbjax Stubbjax force-pushed the fix-shrouded-building-placement branch from 9cf4866 to 1ba188e Compare September 28, 2025 11:42
@Stubbjax Stubbjax marked this pull request as ready for review September 28, 2025 11:59
@Stubbjax
Copy link
Author

Stubbjax commented Sep 28, 2025

Multiplayer games seem fine with this change but I'm unsure why the retail replays mismatch. As this is a blocker, I've just CRC checked the fix.

I've investigated / tested a bit more and believe I have a solution that resolves desync issues and stuck AI.

@Stubbjax Stubbjax force-pushed the fix-shrouded-building-placement branch from ed2c50a to fa83ef7 Compare September 28, 2025 23:49
{
if (them->testStatus(OBJECT_STATUS_IS_USING_ABILITY) || them->getAI() && them->getAI()->isBusy())
{
return LBC_OBJECTS_IN_THE_WAY;
Copy link

Choose a reason for hiding this comment

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

Side note: I wonder if this code path is missing TheTerrainVisual->addFactionBib( them, TRUE );...

Copy link
Author

Choose a reason for hiding this comment

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

Include that with this change?

Copy link

Choose a reason for hiding this comment

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

Separate. Was just wondering about it as I looked at this code here.

@xezon xezon changed the title bugfix: Check shroud using player index when placing structures bugfix(buildassistant): Fix Network game mismatch by using the correct player index to check shroud status when placing structures Sep 30, 2025
@xezon xezon merged commit 0193ad2 into TheSuperHackers:main Sep 30, 2025
18 checks passed
@Stubbjax Stubbjax deleted the fix-shrouded-building-placement branch September 30, 2025 22:41
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…t player index to check shroud status when placing structures (TheSuperHackers#1646)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocker Severity: Minor < Major < Critical < Blocker Bug Something is not working right, typically is user facing Gen Relates to Generals ThisProject The issue was introduced by this project, or this task is specific to this project ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network match is mismatching when building structures

2 participants