Age | Commit message (Collapse) | Author |
|
|
|
when nothing was changed
due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
|
|
long trains
-Trains will now remember the length of stations it visits and sell cars
when being autoreplaced if they became too long
-If it needs to remove cars, then it starts from the front and sells
all it can find until the train is short enough
-This only works for trains, that knows the station length of the route
so a full uninterrupted run is needed
-a train needs 1-2 runs to detect if the shortest station is expanded
-This feature can be turned on and off in the train replace window
and each company can have it's own setting
-NOTE: minor savegame version bump
|
|
|
|
|
|
articulated rail vehicles.
|
|
|
|
the former front engine is moved away (Meush)
|
|
used, for example, by coal tenders.
|
|
than one vehicle will try to move cargo from all vehicles
currently this applies to planes and multiheaded train engines (no more lost airmail)
added GetNextEnginePart() that returns the next vehicle in an engine nomatter what type it is
when more types of multivehicle engines are added, they will have to be added here too or autoreplace will not remove all cargo
|
|
|
|
the train instead of the number of wagons. The actual length is cached in the first vehicle of the train.
|
|
line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks()
This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
|
|
duplication, and make it apply only to vehicles with a custom image.
|
|
this var works like _new_train_id and the rest of that kind of vars, except it is set each time a vehicle is build, nomatter what type
this is a nice tool to code vehicle independent code, which in turn can reduce code duplication
Right now it's used in ReplaceVehicle() and CmdCloneVehicle()
|
|
return values, ... mostly related to the clone vehicle GUI
|
|
this is a complete rewrite, that makes use of existing commands like build and sell
this means that multiheaded train engines are replaced correctly
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
circumstances.
Simplify this check by testing the rail vehicle info flags instead of passing a global variable around.
Note: This is not exactly the original behaviour, because the Lev4 was always allowed to be built, but i guess that was a glitch.
|
|
|
|
|
|
|
|
(not a fix, because the old == method works so far)
|
|
|
|
proper types or just removing them
|
|
Fix warning in graph_gui.c with const problem
|
|
plus some related changes (mostly casts)
|
|
s/byte/PlayerID/
s/int/PlayerID/
and related changes
|
|
references to our (new) original engine/vehicle tables.
|
|
them so NewGRF data can be loaded without wiping out the default data.
|
|
enabled by default.
|
|
pbs segment, instead of letting the pathfinder determine this.
|
|
livery overrides. Fixes max speed in dbsetxl etc.
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
for everyone
- Add IsLocalPlayer() which substitutes _local_player == _current_player
|
|
owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
|
|
|
|
-This allows a player to clone an excisting vehicle of his own
-[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed
-Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
|
|
inconsistencies while trying to locate bug 1244167
|
|
|
|
|
|
can check if an arbitrary junction is a pbs junction. Preparations for making pbs more safe.
|
|
|
|
|
|
of GB - should be a bit nicer to read
|
|
in an if statement
|
|
instead of Dijkstra.
- Benchmark shows that NTP is now around 10x faster than NPF.
- Made IsTunnelTile macro to determine if a tile is a tunnel.
- Added some useful debugging functions for making tiles red / getting accurate timestamps.
- Remove old depot finding algorithm.
- Disable warning for signed/unsigned comparisons.
|
|
explicitly. Prevents trains from unreserving eachothers paths in some cases.
- CodeChange: Use the TrackdirToTrack function instead of &7, and remove an unneeded variable.
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
old pathfinder.
- Penalties for red signals and for slopes.
- Increased the search depth to work better with large train networks.
|