forked from mirror/OpenTTD
Codechange: turn a constant variable into a real constant.
This commit is contained in:
@@ -1841,15 +1841,10 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize
|
||||
t->exclusive_counter = 0;
|
||||
t->statues = 0;
|
||||
|
||||
extern int _nb_orig_names;
|
||||
if (_settings_game.game_creation.town_name < _nb_orig_names) {
|
||||
/* Original town name */
|
||||
t->townnamegrfid = 0;
|
||||
t->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name;
|
||||
} else {
|
||||
/* Newgrf town name */
|
||||
t->townnamegrfid = GetGRFTownNameId(_settings_game.game_creation.town_name - _nb_orig_names);
|
||||
t->townnametype = GetGRFTownNameType(_settings_game.game_creation.town_name - _nb_orig_names);
|
||||
{
|
||||
TownNameParams tnp(_settings_game.game_creation.town_name);
|
||||
t->townnamegrfid = tnp.grfid;
|
||||
t->townnametype = tnp.type;
|
||||
}
|
||||
t->townnameparts = townnameparts;
|
||||
|
||||
|
Reference in New Issue
Block a user