diff options
author | rubidium <rubidium@openttd.org> | 2013-05-19 14:22:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-05-19 14:22:04 +0000 |
commit | 39474532777a1f7beadfd940abf29292bc39879a (patch) | |
tree | 59165ada9556ce5b154ec31cbb994827e7e90fe6 /src/roadveh_cmd.cpp | |
parent | 0cc3d8df4b79628c702ba1293cdc00c099dd0b60 (diff) | |
download | openttd-39474532777a1f7beadfd940abf29292bc39879a.tar.xz |
(svn r25259) -Codechange: track capacities and usage of links
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 44336ac45..77b82a420 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -279,8 +279,10 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin v->spritenum = rvi->image_index; v->cargo_type = e->GetDefaultCargoType(); v->cargo_cap = rvi->capacity; + v->refit_cap = 0; v->last_station_visited = INVALID_STATION; + v->last_loading_station = INVALID_STATION; v->engine_type = e->index; v->gcache.first_engine = INVALID_ENGINE; // needs to be set before first callback @@ -311,6 +313,7 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin /* Call various callbacks after the whole consist has been constructed */ for (RoadVehicle *u = v; u != NULL; u = u->Next()) { u->cargo_cap = u->GetEngine()->DetermineCapacity(u); + u->refit_cap = 0; v->InvalidateNewGRFCache(); u->InvalidateNewGRFCache(); } |