-
Notifications
You must be signed in to change notification settings - Fork 141
bugfix(armorstore): Create overrides for ArmorTemplate data from custom maps to avoid CRC mismatch in the next multiplayer game session #2060
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
…om maps to avoid CRC mismatch in the next multiplayer game session
|
I guess we can do something similar for weapon templates as well? |
Core/GameEngine/Source/Common/System/GameMemoryInitPools_GeneralsMD.inl
Outdated
Show resolved
Hide resolved
| const NameKeyType key = TheNameKeyGenerator->nameToKey(name); | ||
|
|
||
| // TheSuperHackers @bugfix Caball009 04/01/2025 Avoid mismatches by creating overrides instead of overwriting the default data. | ||
| // The code resembles the code of the ThingFactory. |
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.
Not directly related:
Can we perhaps make a change to streamline the override code between classes and then provide some code to avoid this boiler plate code in each of these classes that do overrides? Perhaps some template functions that help set it up.
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.
I was also thinking along those lines. I figured I'd start with the simplest of the classes that need overrides to see what it's required and what the review comments would be.
@Mauller I'll see if I can find a way to reuse the same code for all these INI parsers that require overrides.
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.
Ok how do you wish to proceed with this matter?
Possible strategy:
- Clean up all existing INI override code and streamline their implementions
- Provide helper code for all INI override boiler plate code and place them in EA code
- Add INI overrides with helper code to all remaining classes that need INI overrides (very complex)
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.
I've started with this. I need to check out all INI overrides, though, because some classes do stuff that others don't.
I think I can show the code I'm working on in a couple of days.
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.
Implemented an override system for the
ArmorStorelike theThingFactoryto avoid potential mismatches because the originalArmorTemplatedata is overwritten and not restored.TODO:
ThingFactoryas much as possible.