Closed XenoTheStrange closed 3 months ago
Example of a bugged set of captures caused by this error:
The captures that should have been made: rimworld-wise-Map-0-PlayerHome-5500-1-06-09 (filesize too large) rimworld-wise-Map-1-5500-1-06-09 rimworld-wise-Map-2-5500-1-06-09 rimworld-wise-Map-3-5500-1-06-09 rimworld-wise-Map-4-5500-1-06-09
I was originally trying to figure out / fix how the game would force-switch your map after rendering but it turns out the problem is bigger than that.
To reproduce: Just have multiple maps and set them to render at an interval. You won't get the proper output most of the time, it's somewhat random because it depends in what order the renders run and how long each takes.
Maybe set some global "Rendering" variable so each map component will wait for the other one to finish rendering before it goes? Idk.
There is something similar that prevents this sort of scenario if one map tries to render while it's already rendering.
The problem of it switching to a random map is due to several instances of the DoRender function running at the same time, so while one changes the map to render it the other is saving that map as the one to return to instead of the proper one:![image](https://github.com/JonathanTroyer/Progress-Renderer/assets/48196283/9d00933b-e6ee-4bfe-93a0-2af0a2fa61da)
This image should be a good indicator of what's going on. I'm not sure what a good fix would be without introducing artificial lag by making the functions wait for each-other.
Since the mod needs to switch to another map in order to render it, multiple renders should not happen simultaneously.
Originally posted by @XenoTheStrange in https://github.com/JonathanTroyer/Progress-Renderer/issues/29#issuecomment-2033145365