Fix rulesINI not resetting all data after loading mod map and then loading another map #451
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue is that RulesClass data isn't reset between map loads. The only data reset is the data defined in Rules.INI, Aftermath.INi and MPlayer.INI. Certain Counterstrike levels like 'Legacy of Tesla' give the Allies Mobile Radar Jammer unit a Tesla weapon. After playing the map the Mobile Radar Jammer will have Tesla weapon until the game is exited to desktop.
This code also fixes the issue of buildings and vessels with BuildLevel set to -1 not loading cameo data. It also fixes the issue that MPLAYER.INI rules changes overwrite map ones.