src/openttd.cpp
changeset 8494 88f26cafc858
parent 8477 b7428cf1d567
child 8508 a11cf431051f
--- a/src/openttd.cpp	Sun Dec 02 14:29:48 2007 +0000
+++ b/src/openttd.cpp	Sun Dec 02 14:48:26 2007 +0000
@@ -724,6 +724,13 @@
 	SettingsDisableElrail(_patches.disable_elrails);
 	SetDefaultRailGui();
 
+	/* We are the server, we start a new player (not dedicated),
+	 * so set the default password *if* needed. */
+	if (_network_server && !StrEmpty(_network_default_company_pass)) {
+		char *password = _network_default_company_pass;
+		NetworkChangeCompanyPassword(1, &password);
+	}
+
 	MarkWholeScreenDirty();
 }