Anomaly DLC
Issue tracking bugs and unsynced features from the Anomaly DLC.
Copied from #429:
~~RimWorld.GameConditionManager+MapBrightnessTracker:Tick uses Time.deltaTime to change the map's brightness. This is then used by RimWorld.GameConditionManager in MapBrightness, BrightnessChanging, and DarknessVisible properties.~~
~~I believe that this will cause some issues:~~
~~- MapBrightness is used by RimWorld.ThoughtWorker_SwallowedByDarkness and RimWorld.GameCondition_UnnaturalDarkness~~
~~- BrightnessChanging is used by RimWorld.WeatherDecider~~
~~So I believe we'll need to replace the call to Time.deltaTime in here with something else that's safe for MP.~~
Should be fixed by #453
RimWorld.CompObelisk_Abductor:GenerateLabyrinth seems to desync due to using LongEventHandler.QueueLongEvent with doAsynchronously set to true.
Just to clarify - the desync happens due to the map that was generated being different for each of the players.
RimWorld.UndercaveMapComponent:MapComponentTick uses current map checks, after which it calls RNG. We'll need to push/pop RNG (or make a different patch to fix it).
All the RNG ticks are graphical FX only.
Addendum to the previous comment I made:
Majority of what happens in RimWorld.UndercaveMapComponent:MapComponentTick is graphical or sound effects. However there's an exception to this.
When a player is specifically looking at the map containing this component, and the cave is currently collapsing, it will cause rocks to spawn on the map (Verse.RoofCollapserImmediate:DropRoofInCells). This specific call is found after 2 current map checks (one of them being most likely redundant).
I see 3 possible solutions here:
- Disable the falling rocks mechanic in Multiplayer, push/pop RNG for the component ticking
- The falling rocks have low gameplay impact, as there's an additional check to prevent them from falling near player-controlled Pawns - however, they could still crush enemy Pawns
- Always enable the graphical effects on the map, even if not currently looking at that specific map
- This will still require us to push/pop the RNG, as some of the RNG calls happen after check if something is visible in the current view rect
- This will have unnecessary performance impact, as it will trigger graphical effects on maps which aren't visible
- Modify the method to specifically always trigger the rock collapse even if not looking at the map, while pushing/popping the RNG for the remainder of the method
- It will require the most work when compared to other solutions
- This solution will have lower performance impact than always assuming the player is looking at this specific map
This is most likely a non-Anomaly issue, but dropping it here as I only noticed it on anomaly entities.
The additional graphic attachments (at least that's what I assume those are) are disconnected from the pawn and instead drawn quite far away from where they're supposed to be. Converting the same save file to SP and testing displays the proper graphics.
MP example
SP example
A potential issue with Multifaction, which I've mentioned in #496, is that the state of anomaly is global rather than local (GameComponent_Anomaly). This will cause some issues with Anomaly in Multifaction, like only having 1 monolith (the GameComponent only stores one of them if more were to be spawned), only 1 player being able to experience Anomaly ending (since, again, this is tied to the monolith and its map).
Unnatural corpse teleporting desyncs multiplayer due to random value not being synced.