Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split TradeRoutePathCache into UI and DLL instances #10250

Merged

Conversation

seroperson
Copy link
Collaborator

@seroperson seroperson commented Sep 23, 2023

Savegame incompatible (!) because I moved m_aiLongestPotentialTradeRoute from CvCity to CvGameTrade.

Split TradeRoutePathCache into UI and DLL instances to improve MP stability. After all my PRs it still desyncs, but splitting should finally resolve such issues.

Also added some kind of QoL improvement to MP games: when desync happened, desynced player sends a message to the chat. If you do MP stability test, you can do your report immediately after such message appeared, because we already have a desync and we have to investigate it, no sense to play until CTD or something like that. @Cyclopia31
If you play the real MP session, it can be just a signal that something is going wrong now. You may want to re-create session to restore the host's state to get rid of desync consequences, but no guarantees that it would not be triggered again.
m_bIsDesynced variable resets after each turn and new message will appear with next turn if something is still desynced, so maybe spamming is possible in real MP sessions if you just continue the game after a detected desync. We can discuss, maybe it would be better to send such message just once and don't reset the m_bIsDesynced variable.
Looks like so (with fake desync at each turn just for an example):
1

@axatin @RecursiveVision @ilteroi please, check my CPP because it can be error-prone a little bit 馃寶

@n-core
Copy link
Contributor

n-core commented Sep 28, 2023

Session is running in desynced state, undefined behaviour may appear. Please, fill the issue on GitHub.

Maybe make it a text key? So then people who aren't playing in English can localize it.
TXT_KEY_VP_MP_WARNING_DESYNC or something.

Also, it's better to include the link where you can report it. Not all MP users get VP from the CFC forum or visit VP GitHub. Some of them get VP from their friend.
Session is running in a desynced state, undefined behavior may appear. Please, fill in the issue on GitHub. (https://github.com/LoneGazebo/Community-Patch-DLL/issues)

@RecursiveVision RecursiveVision merged commit 3d3043f into LoneGazebo:master Sep 28, 2023
qingyin3545 pushed a commit to qingyin3545/Community-Patch-DLL that referenced this pull request Oct 7, 2023
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.

None yet

3 participants