forked from mirror/OpenTTD
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names. -Fix: NewGRF engines could not be renamed.
This commit is contained in:
@@ -1343,6 +1343,34 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
if (CheckSavegameVersion(84)) {
|
||||
Player *p;
|
||||
FOR_ALL_PLAYERS(p) {
|
||||
p->name = CopyFromOldName(p->name_1);
|
||||
if (p->name != NULL) p->name_1 = STR_SV_UNNAMED;
|
||||
p->president_name = CopyFromOldName(p->president_name_1);
|
||||
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;
|
||||
}
|
||||
|
||||
Town *t;
|
||||
FOR_ALL_TOWNS(t) {
|
||||
t->name = CopyFromOldName(t->townnametype);
|
||||
if (t->name != NULL) t->townnametype = SPECSTR_TOWNNAME_START + _opt.town_name;
|
||||
}
|
||||
|
||||
Waypoint *wp;
|
||||
FOR_ALL_WAYPOINTS(wp) {
|
||||
wp->name = CopyFromOldName(wp->string);
|
||||
wp->string = STR_EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
/* convert road side to my format. */
|
||||
if (_opt.road_side) _opt.road_side = 1;
|
||||
|
||||
@@ -1936,10 +1964,6 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
if (CheckSavegameVersion(37)) {
|
||||
ConvertNameArray();
|
||||
}
|
||||
|
||||
/* from version 38 we have optional elrails, since we cannot know the
|
||||
* preference of a user, let elrails enabled; it can be disabled manually */
|
||||
if (CheckSavegameVersion(38)) _patches.disable_elrails = false;
|
||||
|
Reference in New Issue
Block a user