Changeset - r10150:4b430e4297f4
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-09-15 22:45:18
smatz@openttd.org
(svn r14336) -Fix (r14334): when there was a station with custom name in an old savegame, it's default name was empty
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -1345,13 +1345,14 @@ bool AfterLoadGame()
 
			if (p->president_name != NULL) p->president_name_1 = SPECSTR_PRESIDENT_NAME;
 
		}
 

	
 
		Station *st;
 
		FOR_ALL_STATIONS(st) {
 
			st->name = CopyFromOldName(st->string_id);
 
			if (st->name != NULL) st->string_id = STR_EMPTY;
 
			/* generating new name would be too much work for little effect, use the station name fallback */
 
			if (st->name != NULL) st->string_id = STR_SV_STNAME_FALLBACK;
 
		}
 

	
 
		Town *t;
 
		FOR_ALL_TOWNS(t) {
 
			t->name = CopyFromOldName(t->townnametype);
 
			if (t->name != NULL) t->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name;
0 comments (0 inline, 0 general)