Commit Graph

110 Commits (1e13bf3d272a37dba078259bfd07481abbb5de8b)

Author SHA1 Message Date
tron 53d30138b2 (svn r2189) Introduce and use IsCompatibleTrainStationTile()
This should prevent trains, which are longer than the station, to turn around without stopping under certain circumstances and fix speed limit for trains entering a station, when realistic accerlation is used
20 years ago
tron 8b1d334927 (svn r2176) Revise CheckOprhanedSlot():
- Don't assert the vehicle type, as it can be anything
- Don't touch the slot information of the vehicle, because it's possible that it is not a road vehicle anymore and even if it is, it has nothing to to with that slot
- Trim the debug printout, because the information about the vehicle is arbitrary
(Joint effort with Darkvater)
20 years ago
Darkvater 8f4583b161 (svn r2168) - Fix: Various stages of invisible trains, and wrong v->u.rail.track combinations. When a vehicle was sold its (possibly) assigned road slot for multislot was not cleared, thus resulting in a bug confusion. This should fix [ 1178520 ] Assertion failure in ai.c (invalid v->u.rail.track). With big thanks to TrueLight for the demo-recording patch, BJH for the wonderful savegame, Hackykid for his brilliant suggestions of the problem and Celestar for... ehm, making it all possible ;p 20 years ago
celestar b505d1782f (svn r2097) -Codechange: [Multistop] Prettified the previous commit 20 years ago
celestar b0aa584794 (svn r2096) -Codechange: [Multistop] Modfied some debug stuff 20 years ago
celestar 0cec257797 (svn r2055) -CodeChange: Begun introducting StationID 20 years ago
celestar 879513b1b2 (svn r2031) -Fix: Station #256 now gets cargo delivered as well 20 years ago
darkvater d0ea6bcdf0 (svn r2011) - Fix: [ 1162209 ] Fix OS/2 build (orudge) #2 20 years ago
tron ca3ccff729 (svn r1981) Typedef some structs and enums 20 years ago
tron 9d1526e0a4 (svn r1976) Cleanups - mostly indentation and fiddling with loops 20 years ago
Darkvater 5ee5ec1770 (svn r1961) - Fix: [ 1158618 ] Segmentation fault when loading savegame, out of bounds array check. 20 years ago
pasky 99499094a9 (svn r1958) GenerateStationName() tidyup. 20 years ago
tron f126e6022c (svn r1928) Miscellaneous cleanups (data types, whitespace, const correctness) 20 years ago
tron f5cb663ddf (svn r1927) Replace implementation of UpdateStationAcceptance(). The new one doesn't malloc() and calculates the station area in one pass instead of 3 20 years ago
tron 4099a85743 (svn r1921) -Fix: Out of bounds array access which caused oil rigs to accept other cargo types besides passengers and mail 20 years ago
celestar 3608788f6b (svn r1872) -Fix: Fixed an inline problem which caused MSVC6 to not compile :/ 20 years ago
tron 830565514c (svn r1867) Include tables/sprites.h only in files which need it 20 years ago
tron 7d56d1d841 (svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters 20 years ago
tron 6984d6cd31 (svn r1832) Next byte -> char iteration: custom names 20 years ago
truelight 79d1ed2c66 (svn r1818) -Add: Dynamic orders (up to 64k orders) 20 years ago
truelight bd7f37d592 (svn r1817) -Codechange: Moved depot-functions to depot.c
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer 
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
20 years ago
tron 36c9758c94 (svn r1803) Move debugging stuff into files of it's own 20 years ago
celestar ff39c260f7 (svn r1799) -Codechange: [ Multistop ] Added debug class "ms" and more debugging
output for multistops
20 years ago
truelight 52ce9d21cc (svn r1789) -Fix: there is no need to save the index, it is done for us 20 years ago
truelight d3aa3043e3 (svn r1788) -Add: Made RoadStops dynamic. You can now create up to 64k roadstops. 20 years ago
truelight 3eda5e61f7 (svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations 20 years ago
truelight 0668a6b485 (svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
(and should be an uint16, not uint8)
20 years ago
tron c51ed8465d (svn r1769) Don't compute the same value twice, remove one function call 20 years ago
matthijs eb78cdb2d4 (svn r1751) - Feature: New PathFinder (NPF).
- Supports trains, road vehicles and ships.
	- Uses A* pathfinding (same codebase as the new ai).
	- Currently unlimited search depth, so might perform badly on large maps/networks (especially ships).
	- Will always find a route if there is one.
	- Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values).
	- With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again.
- Feature: Disabling 90 degree turns for trains and ships.
	- Requires NPF to be enabled.
	- Ships and trains can no longer make weird 90 degree turns on tile borders.
- Codechange: Removed table/directions.h.
	- table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location?
- Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault.
- Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64.
- Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED.
- Codechange: Moved TileAddWrap() to map.[ch] 
- Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). 
- Codechange: Moved IsTrainStationTile() to station.h
- Add: IsRoadStationTile() and GetRoadStationDir().
20 years ago
tron bb680056b1 (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names 20 years ago
celestar 337de948c1 (svn r1743) -Fix: Multistop: Added some debug output and made sure that orphaned slots are cleared. 20 years ago
celestar 9a3089b403 (svn r1735) -Fix: [ 1112285 ] Fixed an assertion error with stations where stops
were deleted, the assertions were just plain wrong at that place. Used a
more graceful handling. Todo: What happens if ALL stations in a schedule
have no suitable stop?
20 years ago
celestar 3c82a2b3c7 (svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station.
Thanks to: Truelight for the saveload code, Darkvater and Hackykid for
network testing and Tron for proof-reading 1500 lines of diff.
20 years ago
tron 38587b60f7 (svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
20 years ago
tron 39858e696b (svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h 20 years ago
celestar 558dcd8ee0 (svn r1694) -Fix: Forgot to remove a DEBUG statement :( 20 years ago
Celestar 0a531338e9 (svn r1693) -Fix: [ 1108618 ] A wrong error message was displayed when trying to
expand railroad stations beyond maximum spread
20 years ago
tron 07cb3068ae (svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
dominik 274b4f01ee (svn r1579) Fix: [ 1105963 ] Buoys can now only be removed if no ship has it in their schedule.
This makes buoys more useable in multiplayer games again, as buoys can't be deleted by other players if they are used.
20 years ago
bjarni 467e4b82bf (svn r1568) made an enum of train subtypes to make the code more readable 20 years ago
tron 90cafa9b15 (svn r1560) Introduce SetTileType() and SetTileHeight()
Replace direct references to _map_type_and_height with these
20 years ago
tron 61a6bc544d (svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts 20 years ago
tron 58484ce6ee (svn r1533) Turn an if cascade into a switch and move a const array to the only location where it is used 20 years ago
truelight 7cafdf3b0b (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-Codechange: renamed all 'schedule' stuff to 'order(list)'
-Codechange: moved all order-stuff to order_cmd.c / order.h
-Codechange: vehicles that share orders are now linked to eachother
  with next_shared/prev_shared in Vehicle

  Developers: please use AssignOrder to assign data to an order. If not, 
   you _WILL_ make the save-routine to assert!
20 years ago
tron 412cf98eb4 (svn r1512) Replace probably incorrect test of loading_count with probably correct test of loaded_count 20 years ago
darkvater 4734a0e690 (svn r1472) -Fix: correct error message for when trying to build a railroad station over a bus/truck/etc-station. 20 years ago
Celestar 91a75191a2 (svn r1467) Fixed a nasty bug where one could build one station OVER the other 20 years ago
celestar e0a8b21404 (svn r1441) Fixed a couple of warnings, and removed a pointless assert 20 years ago
tron 414ac3286b (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] 20 years ago