-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow sandbox mode map resize in pause mode #9955 #9969
Allow sandbox mode map resize in pause mode #9955 #9969
Conversation
I just reproduced this issue to see whats actually going on. As @Gymnasiast already suggested flipping the cheat will not necessarily solve the issue, if for any other reason the tile element can not be erased it will try to erase the same element over and over again as the loop is not currently not handling errors. Also this might be a problem for multiplayer as the elements are not removed immediately given that it requires a round trip so the client will likely be stuck in that loop. Edit: Just realized that editing the map size in multiplayer is not synchronized also. |
Prevents infinite loop by forcing BuildInPauseMode on for the duration of the map_remove_out_of_range_elements() call.
Set BuildInPauseMode to true during map_remove_out_of_range_elements()
dbbaf5d
to
d5866e1
Compare
Did you actually test multiplayer? This will still freeze the client because the deletion will actually happen later and the loop expects the element to be gone right away. |
This apparently broke multiplayer, when joining a server you can crash or get an error that you don't have permission, it should not use game actions to temporarily set the state. |
Let's revert it, then. Do you want to do it or shall I do it? |
I think I will modify this slightly but not exactly revert it. |
Since map_remove_out_of_range_elements is the culprit for causing the infinite loop, I toggled BuildInPauseMode to be on for the duration of the call.