Fix: Uncontrollable spam of some condition causers (weather, climate, psy drone) #780
+37
−0
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.
I must say, vanilla "CompCauseGameCondition" is absolute garbage for optimisation.
Currently in async MP game-breaking bug exists that insta-scorches or deep-freezes you from a single climate adjuster, because it spams new condition each tick. I've fixed that, by ensuring same source wouldn't spam endless conditions to the map.
Small bug still persist, somewhere in the
CompCauseGameCondition.PostExposeData, where game cannot rebuild info about the condition source on load (YEAH, SAVE FILE DOESN'T CONTAIN INFO ABOUT IT, LOL), which causes every stackable condition to duplicate once (and also loses source info about every other condition). It clears itself after 5 seconds and never present outside of hosting the save file, so shouldn't be a big deal overall.Without the
Patch_CompCauseGameCondition_CompTickconditions duplicate on load quite a few times, while with that patch its just doubles once on the first real tick (from the source loss on originals).