summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-15 23:50:12 +0000
committersmatz <smatz@openttd.org>2008-09-15 23:50:12 +0000
commit6d5475cb914ae4825ae98bea29317083af9a0a3b (patch)
tree43bc87c19afa58e7cc2466e59db370179a74d251 /src
parentaef674d858b0bea2d6ccc14de488cd6c9617f8c1 (diff)
downloadopenttd-6d5475cb914ae4825ae98bea29317083af9a0a3b.tar.xz
(svn r14339) -Fix (r13731): crash when loading the intro game failed
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index afbe2628a..a06b0137c 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -363,10 +363,12 @@ static void LoadIntroGame()
if (SaveOrLoad("opntitle.dat", SL_LOAD, DATA_DIR) != SL_OK) {
GenerateWorld(GW_EMPTY, 64, 64); // if failed loading, make empty world.
WaitTillGeneratedWorld();
+ SetLocalPlayer(PLAYER_SPECTATOR);
+ } else {
+ SetLocalPlayer(PLAYER_FIRST);
}
_pause_game = 0;
- SetLocalPlayer(PLAYER_FIRST);
_cursor.fix_at = false;
MarkWholeScreenDirty();