-
Notifications
You must be signed in to change notification settings - Fork 121
bugfix(buildassistant): Fix Network game mismatch by using the correct player index to check shroud status when placing structures #1646
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
bugfix(buildassistant): Fix Network game mismatch by using the correct player index to check shroud status when placing structures #1646
Conversation
|
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. |
a34b0f2 to
9cf4866
Compare
9cf4866 to
1ba188e
Compare
|
I've investigated / tested a bit more and believe I have a solution that resolves desync issues and stuck AI. |
ed2c50a to
fa83ef7
Compare
…c issues and stuck AI
Generals/Code/GameEngine/Source/Common/System/BuildAssistant.cpp
Outdated
Show resolved
Hide resolved
| { | ||
| if (them->testStatus(OBJECT_STATUS_IS_USING_ABILITY) || them->getAI() && them->getAI()->isBusy()) | ||
| { | ||
| return LBC_OBJECTS_IN_THE_WAY; |
There was a problem hiding this comment.
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 );...
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…t player index to check shroud status when placing structures (TheSuperHackers#1646)
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.