Commit Graph

756 Commits (ee333a954934fee206a65795670d15150178c0f3)

Author SHA1 Message Date
Michael Lutz ee333a9549
Fix 2183fd4d: [NewGRF] Use divide instead of right shift for signed numbers. (#9480)
"For negative a, the value of a >> b is implementation-defined (in most implementations, this performs arithmetic right shift, so that the result remains negative)."
3 years ago
Vít Šefl 2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles (#9346) 3 years ago
glx22 49b66ea504 Codechange: Remove FOR_EACH_SET_TRACK 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
rubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 3 years ago
Jonathan G Rennison a896753ecc Fix #9264: Do not attach temporary wagons to free wagon chains when autoreplacing 3 years ago
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 3 years ago
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 3 years ago
Patric Stout cd36e17160
Fix: don't allow free-wagon-chains to exceed max-train-length (#8533)
This makes no sense, that a free-wagon-chain could be larger than
the maximum length of a train, as you cannot put an engine in
front of that anyway. And it prevents run-away AIs making very
silly long free-wagon-chains.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Patric Stout dff7ee8e1c
Fix #7611: keeps news about accidents around after vehicle is cleaned up (#8497)
When a vehicle is cleaned up, all news that points to the news is
also removed. This was a bit evil, as it would also remove any
news related to crashed, acting like the crash never happened.
This left players a bit in the dark what was going on exactly.
3 years ago
Matt Kimber 9b28b15e67 Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods 3 years ago
Andy 0f91cb0479
Fix: GetCurveSpeedLimit needs railtype from current tile (#8466) 3 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Michael Lutz cc5f175615 Feature: Railtype flags to allow/disallow 90 degree curves. (#7352) 5 years ago
Michael Lutz 690d1dd6a4 Fix #7159, e934f09: Waiting time at red one-way signals was too short.
This is not an exact fix as previously, the wait time was speed/acceleration dependant. This simple fix ignores that and just makes the 'days' from the settings comment to be actually days.
5 years ago
J0an Josep 029c48cf4a Cleanup: [NPF] Remove unused parameter. 5 years ago
J0an Josep 96c5e5e73a Cleanup: [NPF] Remove unused parameters. 5 years ago
Joan Josep 96854b2b8b Codechange #5859: Simplify CheckTrainStayInDepot() (#7045) 5 years ago
Andy e934f09f02 Fix: Don't increase motion counter while train is waiting at non-path signals (Author: frosch123) #5877 (#7018) 5 years ago
Charles Pigott bb7353c02a Codechange: Some more null checks 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Niels Martin Hansen 2a868b9f3b Feature: Framerate display window (#6822)
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
6 years ago
PeterN c2a7728084
Fix: Prevent ships moving into docks after finishing (un)loading. (#6791) 6 years ago
PeterN a07394a63a
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
peter1138 5951d2406e (svn r27811) -Change: Remove unused parameters in FreeTrainTrackReservation
FreeTrainTrackReservation is always called with INVALID_TILE
and INVALID_TRACKDIR as second and third arguments, so remove
them and just use those constants instead. (cirdan)
7 years ago
peter1138 67ab0450dd (svn r27809) -Codechange: Improve check in UpdateLevelCrossing
In UpdateLevelCrossing, checking if a level crossing is reserved is
cheaper than finding trains on it or approaching it, so do it first. (cirdan)
7 years ago
frosch c175067ed9 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 8 years ago
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
frosch a6d1d128da (svn r27663) -Codechange: Deduplicate code when rotating crashed vehicles. 8 years ago
frosch d188d02384 (svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts. 8 years ago
frosch 378653100b (svn r27419) -Fix [FS#6369]: CmdSellRailWagon did not revert all actions properly when no orderlist could be allocated. (Juanjo) 9 years ago
frosch beb213f9ee (svn r27209) -Add: Draw path reservation on the whole bridge, not only on the bridge heads. 9 years ago
frosch a8080b6256 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 9 years ago
rubidium d534c80e94 (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 10 years ago
peter1138 ce9fab58bc (svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists. 10 years ago
peter1138 c64586ea44 (svn r26907) -Codechange: Scale engine purchase list to GUI zoom level for multihead engines. 10 years ago
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 10 years ago
fonsinchen c915d9fa55 (svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private 10 years ago
rubidium 0463dbdc9e (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 41b7a04a68 (svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity when they are not supposed to, and truncate cargo appropiately if they are allowed to. 10 years ago