Commit Graph

23 Commits (10ae23d3b91375f30bdbe45a0afff3f56c7b14b1)

Author SHA1 Message Date
Jonathan G Rennison 3ac94e97c8 Cache the result of GetImage() in Vehicle::UpdateViewport() where possible.
Sprite number is not cached if callback is made, or a variable access
outside a whitelist occurs.
Invalidate cached sprite number when direction or cargo changes,
or vehicle is marked dirty.
8 years ago
Jonathan G Rennison 5eed9865d6 Improved breakdowns: Various changes and fixes.
* Revert breakdown_chance to (mostly) its original behaviour.
* Create a new breakdown_chance_factor to hold breakdown_chance
  from improved breakdowns logic.
* Revert airport crash probabilities back to original behaviour, with
  modified behaviour only during emergency landings.
* Low power breakdowns now only reduce the power of the engine which
  has broken down.
* Low power breakdowns no longer reduce speed directly.
* Add callback function to run whenever improved breakdowns setting
  is changed. Reset breakdown_chance_factor where required.
* More whitespace/formatting...
9 years ago
Jonathan G Rennison 9742300a1e Fix some more whitespace/formatting issues. 9 years ago
Jonathan G Rennison 80d52eb20e Improved breakdowns patch: fix various issues
* Whitespace/formatting
* Fix setting lang string
* Fix spelling of VRF_TO_HEAVY
9 years ago
patch-import 9f5164b403 Import Improved Breakdowns patch
Fix trailing whitespace

http://www.tt-forums.net/viewtopic.php?p=1146419#p1146419
9 years ago
rubidium df2b116867 (svn r26702) -Fix [FS#6067]: integer overflows in acceleration code causing either too low acceleration or too large acceleration 10 years ago
rubidium 2be4215f43 (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
frosch 358a2bd6ed (svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked. 12 years ago
rubidium d5eeab43b7 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 6b404d35b8 (svn r23540) -Codechange: unify and document vehicle widgets 13 years ago
rubidium 3b380088f4 (svn r21997) -Fix [FS#4473]: when the difference between force and resistance is smaller than the mass(*4) there would be no acceleration anymore, even when at higher (or lower) speed the force and resistance balance out better 14 years ago
michi_cc c1091569d0 (svn r21712) -Change: Tune 'realistic' acceleration even more to make more trains reach their top speed. 14 years ago
terkhen 74c061c29a (svn r21518) -Codechange: Rename AccelerationCache to GroundVehicleCache. 14 years ago
michi_cc be4dfdd709 (svn r21107) -Fix: Don't use the maximum track speed where the maximum vehicle speed is meant. 14 years ago
michi_cc 06fd794dc7 (svn r21106) -Change: Tuned realistic acceleration to be a bit more realistic in order to make acceleration "slower", which highlights the differences between vehicle types more. 14 years ago
terkhen ac4a3c9101 (svn r21092) -Codechange: Merge max speed functions. 14 years ago
rubidium 360d6daf34 (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
terkhen bd254b06d3 (svn r20303) -Feature: [NewGRF] Air drag property support for trains and road vehicles. Air drag for vehicles with air drag not set or set to zero will use a default value depending on their max speed. 14 years ago
terkhen f33a0370ae (svn r20299) -Add: Make trains and road vehicles use a different area value to calculate air drag. 14 years ago
terkhen a3fdb26bee (svn r19599) -Fix [FS#3751]: Vehicles with a weight of zero crashed the game when using realistic acceleration. 14 years ago
terkhen 2e18705d4e (svn r19343) -Codechange: Make RoadVehicle a child class of GroundVehicle.
-Add: Required acceleration functions at RoadVehicle.
15 years ago
terkhen 963f304f67 (svn r19341) -Codechange: Move GOINGUP/GOINGDOWN flags to GroundVehicle.
-Codechange: Move GetSlopeResistance to GroundVehicle.
15 years ago
terkhen 78dd849452 (svn r19339) -Codechange: Move acceleration functions to GroundVehicle. 15 years ago