-
Couldn't load subscription status.
- Fork 110
unify(network): Merge GameNetwork, GameSpy and adjacent code #1735
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
base: main
Are you sure you want to change the base?
Conversation
45d2a7e to
889d140
Compare
|
List of changes to Generals and Zero Hour added. Did another pass on the merge and fixed a few things. |
| if( m_money.countMoney() == 0 ) | ||
| { | ||
| m_money.deposit( TheGlobalData->m_defaultStartingCash, FALSE ); | ||
| // TheSuperHacker @bugfix Now correctly deposits the money and fixes its audio and academy issues. |
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.
nit: TheSuperHackers
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.
Fixed
| return true; | ||
| } | ||
| } | ||
| s_prevMsg = message; |
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.
Wouldn't this set prevMsg to empty message? I think we can remove this, it's probably better to keep the last not empty message.
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.
If it is a bug then it would have to be fixed outside the merging. We are just copying the bugs to Generals :)
| TheGameSpyPeerMessageQueue->addRequest(req); | ||
| } | ||
|
|
||
| s_prevMsg = message; |
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.
This still sets prevMsg even if nothing is sent - eg if names isEmpty, maybe move this line into if (!names.isEmpty())?
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.
If it is a bug then it would have to be fixed outside the merging. We are just copying the bugs to Generals :)
| slot->getNATBehavior() ); | ||
| //make sure name doesn't cause overflow of m_lanMaxOptionsLength | ||
| int lenCur = tmp.getLength() + optionsString.getLength() + 2; //+2 for H and trailing ; | ||
| int lenRem = m_lanMaxOptionsLength - lenCur; //length remaining before overflowing |
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.
Can this be negative? Maybe use int lenMax = max(0, lenRem / (MAX_SLOTS - i));
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.
slurmlord has a pending change where he reworks this because it is bugged.
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.
Merger looks good. Tested Generals and seems to run fine.
889d140 to
49ca656
Compare
Merge with Rebase
This change merges GameNetwork, GameSpy and adjacent code.
Only GUIUtil.cpp is not merged, because it has Generals Challenge dependencies and perhaps requires some extra care. Can be done another time.
Changes to Generals
Changes to Zero Hour
TODO