# HG changeset patch # User peter1138 # Date 2005-10-31 11:22:52 # Node ID 0b5b25d7740b73863c5777645a8aaee3db3554c8 # Parent 0cfcd6d312a3249749551d80e678d30af98c5b58 (svn r3109) Replace two occurrences of '256' with TOTAL_NUM_ENGINES diff --git a/openttd.c b/openttd.c --- a/openttd.c +++ b/openttd.c @@ -1283,7 +1283,7 @@ bool AfterLoadGame(uint version) if (version < 0x1000) { int i; FOR_ALL_PLAYERS(p) { - for (i = 0; i < 256; i++) { + for (i = 0; i < TOTAL_NUM_ENGINES; i++) { p->engine_replacement[i] = INVALID_ENGINE; } p->engine_renew = false; diff --git a/players.c b/players.c --- a/players.c +++ b/players.c @@ -494,7 +494,7 @@ Player *DoStartupNewPlayer(bool is_ai) p->face = Random(); /* Engine renewal settings */ - for (i = 0; i < 256; i++) + for (i = 0; i < TOTAL_NUM_ENGINES; i++) p->engine_replacement[i] = INVALID_ENGINE; p->engine_renew = false;