(svn r18377) -Codechange: add 'cache' of the tile area of truck and bus stops.

This commit is contained in:
rubidium
2009-12-02 16:20:44 +00:00
parent 31e1c606fd
commit 0f7cee89d8
5 changed files with 75 additions and 8 deletions

View File

@@ -98,6 +98,12 @@ void AfterLoadStations()
st->speclist[i].spec = GetCustomStationSpecByGrf(st->speclist[i].grfid, st->speclist[i].localidx, NULL);
}
if (Station::IsExpected(st)) {
Station *sta = Station::From(st);
for (const RoadStop *rs = sta->bus_stops; rs != NULL; rs = rs->next) sta->bus_station.Add(rs->xy);
for (const RoadStop *rs = sta->truck_stops; rs != NULL; rs = rs->next) sta->truck_station.Add(rs->xy);
}
StationUpdateAnimTriggers(st);
}
}