diff options
author | KUDr <kudr@openttd.org> | 2006-12-27 23:11:43 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2006-12-27 23:11:43 +0000 |
commit | 69a43e5ade84007e5caf941d8a5840c6da6bcabf (patch) | |
tree | 9f7f0303366a4c29f579e8dbd44c2c64ca4224f4 /station.h | |
parent | eb4a2e45c320d6ff5fe72dc8a04b16f6740eb134 (diff) | |
download | openttd-69a43e5ade84007e5caf941d8a5840c6da6bcabf.tar.xz |
(svn r7585) -Codechange: CheckStationSpreadOut() took too much CPU. Station rectangle is now maintained instead of calculating it each time by walking through whole map. Should help with the performance issue related to AIs trying to build road stops too often. (idea by Celestar)
Diffstat (limited to 'station.h')
-rw-r--r-- | station.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -47,6 +47,15 @@ typedef struct StationSpecList { uint8 localidx; /// Station ID within GRF of station } StationSpecList; +/** Station spread out rectangle (not saved) */ +typedef struct StationRect +{ + uint16 left; + uint16 top; + uint16 right; + uint16 bottom; +} StationRect; + struct Station { TileIndex xy; RoadStop *bus_stops; @@ -94,6 +103,8 @@ struct Station { byte truck_stop_status_obsolete; byte bus_stop_status_obsolete; byte blocked_months_obsolete; + + StationRect rect; }; enum { |