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

« back to all changes in this revision

Viewing changes to src/elrail.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman
  • Date: 2008-08-08 11:07:05 UTC
  • mfrom: (1.1.4 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080808110705-zq0eo95c4pexg70i
* New upstream release.
  - Fixes remote crash vulnerability CVE-2008-3547. Closes: #493714

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: elrail.cpp 12141 2008-02-14 15:59:16Z frosch $ */
 
1
/* $Id: elrail.cpp 13685 2008-07-09 18:59:39Z rubidium $ */
2
2
/** @file elrail.cpp
3
3
 * This file deals with displaying wires and pylons for electric railways.
4
4
 * <h2>Basics</h2>
502
502
                }
503
503
        }
504
504
 
505
 
        /* setup total power for trains */
 
505
        /* Fix the total power and acceleration for trains */
506
506
        FOR_ALL_VEHICLES(v) {
507
 
                /* power is cached only for front engines */
508
 
                if (v->type == VEH_TRAIN && IsFrontEngine(v)) TrainPowerChanged(v);
 
507
                /* power and acceleration is cached only for front engines */
 
508
                if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
 
509
                        TrainPowerChanged(v);
 
510
                        UpdateTrainAcceleration(v);
 
511
                }
509
512
        }
510
513
 
511
514
        FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index);