~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/roadveh_cmd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman
  • Date: 2009-06-09 21:46:28 UTC
  • mfrom: (1.1.7 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090609214628-6z5uodi6178z050l
[ Matthijs Kooijman ]
* New upstream release.
* Link against libicu to enable right-to-left language support. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: roadveh_cmd.cpp 15718 2009-03-15 00:32:18Z rubidium $ */
 
1
/* $Id: roadveh_cmd.cpp 16482 2009-05-31 12:22:53Z rubidium $ */
2
2
 
3
3
/** @file roadveh_cmd.cpp Handling of road vehicles. */
4
4
 
137
137
        assert(v->type == VEH_ROAD);
138
138
        assert(IsRoadVehFront(v));
139
139
 
 
140
        v->InvalidateNewGRFCacheOfChain();
 
141
 
140
142
        for (Vehicle *u = v; u != NULL; u = u->Next()) {
141
143
                /* Check the v->first cache. */
142
144
                assert(u->First() == v);
262
264
                v->cargo_cap = rvi->capacity;
263
265
 
264
266
                AddArticulatedParts(vl, VEH_ROAD);
 
267
                v->InvalidateNewGRFCacheOfChain();
265
268
 
266
269
                /* Call various callbacks after the whole consist has been constructed */
267
270
                for (Vehicle *u = v; u != NULL; u = u->Next()) {
268
271
                        u->u.road.cached_veh_length = GetRoadVehLength(u);
269
272
                        /* Cargo capacity is zero if and only if the vehicle cannot carry anything */
270
273
                        if (u->cargo_cap != 0) u->cargo_cap = GetVehicleProperty(u, 0x0F, u->cargo_cap);
 
274
                        v->InvalidateNewGRFCache();
 
275
                        u->InvalidateNewGRFCache();
271
276
                }
272
277
 
273
278
                VehicleMove(v, false);