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

[editor] Flawed mapsettings when opening a map / test #548

Open
chris1384 opened this issue Sep 6, 2024 · 0 comments
Open

[editor] Flawed mapsettings when opening a map / test #548

chris1384 opened this issue Sep 6, 2024 · 0 comments

Comments

@chris1384
Copy link
Contributor

chris1384 commented Sep 6, 2024

Which resource(s) have this problem?
editor_main

Describe the bug
Upon loading a map after the editor just started, or when a player pressed the New map button, loading a small map does not cache its settings properly into editor. This can be observed by the weather not changing, missing map info and the errors that come after testing it.

When the map opened properly, changing any settings, testing it then come back to editor, the map settings revert back to the old ones.
Possible culprit:

setTimer(passNewMapSettings, 1000, 1)

To Reproduce

  1. Start editor
  2. Load a tiny map that has a few elements in it.
  3. Observe how the map settings are broken > reverted to default settings
  4. Test it using a gamemode (eg. race), mapmanager failed to start the map (<info> was not written into meta.xml)

Screenshots
https://www.youtube.com/watch?v=FfJkeqOLL8I

Additional context
After finishing the map test, it goes into black screen. But the map can be tested using F5 again, then the map will be loaded properly.
Weirdly enough, if you open a map for the second time it does load as usual, and can be played without issues.

Possible fixes for map open
// 1


Change this to a timer with delay 200:
setTimer(passNewMapSettings, 200, 1)

// 2 - by @q8X


Increase the delay of this to 100 or even 200.

I will not do a PR because this is experimental and there are probably better alternatives, it's just the matter of finding them.
Awaiting feedback.

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

No branches or pull requests

1 participant