summaryrefslogtreecommitdiff
path: root/genworld.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-07 14:41:53 +0000
committerDarkvater <darkvater@openttd.org>2006-11-07 14:41:53 +0000
commitc4e4fa98fde0570e9f45050e286fca17de7113b6 (patch)
tree1ca4455b3b05bde3c479f06083d15648630668d7 /genworld.c
parent745a5b8cc3df16b8734f50eb08a3e017f89d3273 (diff)
downloadopenttd-c4e4fa98fde0570e9f45050e286fca17de7113b6.tar.xz
(svn r7098) -Regression (r7094): Zoom buttons were not properly updated with a new/loaded game. The
good thing is, we got rid of even more magic code (tm)
Diffstat (limited to 'genworld.c')
-rw-r--r--genworld.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/genworld.c b/genworld.c
index 51bf8d246..55f7bb590 100644
--- a/genworld.c
+++ b/genworld.c
@@ -249,19 +249,23 @@ void GenerateWorld(int mode, uint size_x, uint size_y)
/* Create toolbars */
SetupColorsAndInitialWindow();
- if (_network_dedicated || (_gw.thread = OTTDCreateThread(&_GenerateWorld, (void *)"")) == NULL) {
+ /* Load the right landscape stuff */
+ GfxLoadSprites();
+ if (_network_dedicated ||
+ (_gw.thread = OTTDCreateThread(&_GenerateWorld, NULL)) == NULL) {
+ DEBUG(misc, 1) ("[Sl] Cannot create savegame thread, reverting to single-threaded mode...");
_gw.threaded = false;
_GenerateWorld(NULL);
- } else {
- /* Remove any open window */
- DeleteAllNonVitalWindows();
-
- /* Don't show the dialog if we don't have a thread */
- ShowGenerateWorldProgress();
+ return;
}
+ /* Remove any open window */
+ DeleteAllNonVitalWindows();
/* Hide vital windows, because we don't allow to use them */
- if (_gw.thread != NULL) HideVitalWindows();
+ HideVitalWindows();
+
+ /* Don't show the dialog if we don't have a thread */
+ ShowGenerateWorldProgress();
/* Centre the view on the map */
if (FindWindowById(WC_MAIN_WINDOW, 0) != NULL) {