FactorioScenarioMultiplayerSpawn icon indicating copy to clipboard operation
FactorioScenarioMultiplayerSpawn copied to clipboard

Base cleanup fails sometimes when players leave early

Open Oarcinae opened this issue 2 years ago • 1 comments

Could possibly be happening during the time that regrowth is ABOUT to run. Or could be related to them leaving when the spawn is about to be created?

Oarcinae avatar Jan 09 '23 02:01 Oarcinae

Quickest way to test with one person: join a base, setup a radar, stay for any length of time, as admin, restart yourself. Since my mouse frequently double clicks and the drop down then hits ban player, I moved the drop down below the buttons. Also if you lengthen the time it takes to clean the map and remove the player, this issue occurs more frequently. With multiplayer testing, have another player continually join, quit. This is a bit more time consuming. The issue does not occur every time - so race condition. I've worked around this by setting a global flag in: RegrowthForceRemovalOnTick, and clearing it in the other if case (after the time period) (regrowth_map.lua). and stopping the call to RegrowthSectorScan in the event: on_sector_scanned (control.lua). My scenario sees this issue very frequently since I start the player with a radar. I don't know if other players radar scans could cause this event to occur on your player.

This may be occuring in other situations, but this one fix has reduced the number of times the base is not cleaned up, after a player leaves/resets.

vfinn avatar Jan 09 '23 17:01 vfinn

Well... Finally got around to looking into this while I update my scenario and convert it to a proper mod. And yes, definitely the radar scanning doing this and I can see exactly where this would happen. I should be able to fix this easily by making the base removal not be overridden by radar coverage/scans.

Oarcinae avatar Sep 14 '24 23:09 Oarcinae

Will be fixed in V2.0 mod.

Oarcinae avatar Sep 23 '24 02:09 Oarcinae