-
-
Notifications
You must be signed in to change notification settings - Fork 169
Description
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
- Start editor
- Load a tiny map that has a few elements in it.
- Observe how the map settings are broken > reverted to default settings
- 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
passNewMapSettings() |
Change this to a timer with delay 200:
setTimer(passNewMapSettings, 200, 1)
// 2 - by @q8X
setTimer(handleOpenResource,50,1) |
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.