genworld.c
changeset 5048 b784951def0a
parent 5045 846098142ffe
child 5145 d4a8882b32ef
--- a/genworld.c	Tue Nov 07 13:09:44 2006 +0000
+++ b/genworld.c	Tue Nov 07 14:41:53 2006 +0000
@@ -249,19 +249,23 @@
 	/* 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) {