GreepTheSheep / openplanet-MXRandom

An Openplanet plugin that takes a random map from MX / TMX and play it
https://openplanet.dev/plugin/mxrandom
GNU General Public License v3.0
19 stars 28 forks source link

RMT: Update room with 1 request not 2, fix race condition while changing maps #99

Closed XertroV closed 1 year ago

XertroV commented 1 year ago

I suspect that one of the reasons map changing is a little unreliable is because there's a race condition updating the server. Something like this:

An alternate solution would be to watch the list of maps and wait for that to update before firing the update timer request.

I ran through a lot of map changes yesterday and didn't have a problem using this method, but haven't tested it extensively. I don't think it's any worse than the current implementation, though (i.e., I don't think it'll introduce any new issues even if it doesn't work to fix the map change bug)