Age | Commit message (Collapse) | Author |
|
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
|
|
autoreplacing and could end up with negative money
this is not the same bug as in rev 3128, which means you actually paid 3 times. Now it pays correctly
|
|
autoreplacing and could end up with negative money
|
|
to stop when autoreplacing
this would result in the construction of a new vehicle while the old one just continued
added an assert to make sure it's always stopped before trying to sell the old vehicle
|
|
a plane could lock up an airport
this will not fix already locked up airports
this bug was introduced in rev 3111
|
|
(request by Darkvater)
|
|
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)
|
|
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()
|
|
removed duplicated code and added DoCommand, which used the define build commands added with autoreplace
This should not affect gameplay at all
|
|
showed up in some cases when no replace was needed
|
|
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
|
|
int/uint/int16/byte/-1 with proper types and constants
|
|
CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
|
|
introduced in r2991.
|
|
saved prior to r2868 to load.
|
|
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
|
|
didn't get all stats updated (peter1138)
|
|
This makes GetSpriteDimension() superflous, because now it's just a thin wrapper around GetSprite() returning only part of the information, therefore remove it too
|
|
autoreplace failed if new engine is cheaper than the old one (peter1138)
|
|
save/load code, static in saveload.c
|
|
serverside
-This means that one company can only have one setting for renew and replacing
more clients will not fight due to different settings anymore
-This is a needed step in the line to fix autoreplacing dualheaded locomotives
NOTE: savegame revision bump (peter1138 + me in coop)
|
|
|
|
when cloning refitted trains (chrishuebsch)
|
|
-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
|
|
|
|
|
|
|
|
of GB - should be a bit nicer to read
|
|
|
|
explicitly. Prevents trains from unreserving eachothers paths in some cases.
- CodeChange: Use the TrackdirToTrack function instead of &7, and remove an unneeded variable.
|
|
the calls evenly over the day.
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
- Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings.
- Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
|
|
funciton IsCompatibleRail().
- Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails.
- Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
|
|
committing, restore the sort order in the Makefile
|
|
TileVirtXY
|
|
|
|
|
|
|
|
calls to the associated wrapper functions.
* Codechange: Made npf.c use some map array accessing wrappers instead of direct access.
* Codechange/Fix: Named every enum in tile.h. Fixes a nasty bug on MSVC where arrays would be initialised with zeroes (tnx Asterix_)
* Removed magic numbers from tables in tile.c.
* Added some explicit casts in tile.h.
|
|
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
|
|
|
|
and the callback that goes with it.
- Codechange: Remove some magic numbers (PALETTE_CRASH)
|
|
of calculating it all over the place.
- Fix: Also recalculate the train cache values for 'wagon chains' (in the depot without an engine), to avoid possible desyncs later.
- Fix: Make CmdMoveRailVehicle update the caches of the correct trains in all cases.
|
|
power/weight/max speed instead of recalculating it each time.
- Fix: Station ratings now depends on the max speed of a consist, without being affected by other speed limits from realistic acceleration.
|
|
|
|
removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
|
|
support it. Only valid ones are signs (delete) and waypoints (rename to default).
|