Skip to content
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

Conversation

crorvig
Copy link
Contributor

@crorvig crorvig commented Sep 6, 2019

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.

@crorvig crorvig changed the title Crorvig/fix 9955 allow resize in pause mode Allow sandbox mode map resize in pause mode #9955 Sep 6, 2019
@ZehMatt
Copy link
Member

ZehMatt commented Sep 12, 2019

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.

@Gymnasiast Gymnasiast self-assigned this Oct 1, 2019
crorvig and others added 4 commits October 3, 2019 22:26
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()
@Gymnasiast Gymnasiast force-pushed the crorvig/fix-9955-allow-resize-in-pause-mode branch from dbbaf5d to d5866e1 Compare October 3, 2019 20:53
@Gymnasiast Gymnasiast merged commit 5b41afa into OpenRCT2:develop Oct 3, 2019
@ZehMatt
Copy link
Member

ZehMatt commented Oct 3, 2019

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.

@ZehMatt
Copy link
Member

ZehMatt commented Oct 15, 2019

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.

@Gymnasiast
Copy link
Member

Let's revert it, then. Do you want to do it or shall I do it?

@ZehMatt
Copy link
Member

ZehMatt commented Oct 16, 2019

I think I will modify this slightly but not exactly revert it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants