(svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.

This commit is contained in:
peter1138
2006-03-31 12:59:43 +00:00
parent 859fc1d7f0
commit cd0a67dc65
5 changed files with 14 additions and 8 deletions

View File

@@ -625,7 +625,7 @@ byte GetPlayerRailtypes(PlayerID p)
for (i = 0; i != TOTAL_NUM_ENGINES; i++) {
const Engine* e = GetEngine(i);
const EngineInfo *ei = &_engine_info[i];
const EngineInfo *ei = EngInfo(i);
if (e->type == VEH_Train && HASBIT(ei->climates, _opt.landscape) &&
(HASBIT(e->player_avail, p) || _date >= (e->intro_date + 365)) &&