-
Notifications
You must be signed in to change notification settings - Fork 117
tweak(network): Make VC6 and VS22 builds use different magic values in LAN #1747
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?
tweak(network): Make VC6 and VS22 builds use different magic values in LAN #1747
Conversation
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.
F00F
Needs to be replicated in Generals.
|
Done |
| // Original retail value is used for builds with VC6 | ||
| static const UnsignedShort GENERALS_MAGIC_NUMBER = 0xF00D; | ||
| #else | ||
| static const UnsignedShort GENERALS_MAGIC_NUMBER = 0xF00D+1; |
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.
Thinking about this again, this means new clients will not see retail client, right? That means some players cannot see a group of other players, which may or may not be desirable.
Ideally, all clients would be able to see all other client rooms in the lobby, but not be able to join them if incompatible. There are perhaps tricks we can do to prevent retail clients messing with rooms of new clients. Preventing new clients from joining retail client rooms should be possible.
| }; | ||
|
|
||
| // Magic number for identifying a Generals packet. | ||
| #if defined(_MSC_VER) && _MSC_VER < 1300 |
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.
&& RETAIL_COMPATIBLE_CRC maybe too?
A different magic value for network messages ensures that VS22 build players (for example GO) won't interfere with retail compatible build players.