Commit Graph

27 Commits (8ef3f896f5f20992b18e0ecea7cfa59b8fdffc67)

Author SHA1 Message Date
matthijs 0e08878a68 (svn r2281) - Fix: [ 1115204 ] [NPF] When pressing the goto depot button, trains will now also look behind it if there is no depot in front. If so, the train reverses immediately. This also work anywhere, not just at stations.
- Add: [NPF] Reversing inside of depots now has a penalty. It also applies to trains only, other vehicles shouldn't bother reversing.
- Fix: [NPF] When checking whether to reverse a train, the trackdir of the first loc was used instead of the last vehicle as a starting node for pathfindig.
	This might have caused some trains not reversing when they should have (or vice versa). Typo introduced when converting to GetVehicleTrackdir() in r2256.
- CodeChange: [NPF] Removed duplicate code by letting NPFRouteTjoStationOrTile() call NPFRouteToStationOrTileTwoWay().
- Add: [NPF] NPFRouteToDepotBreadthFirstTwoWay() to find a depot while also looking backwards.
- Add: It is now possibly to specify a path cost for aystar starting nodes.
19 years ago
tron 0ec5775ded (svn r2233) Bracing, whitespace, indendation 19 years ago
tron 403845c9ca (svn r2220) Put two TileIndices into temporary variables to improve readability 19 years ago
tron c731091941 (svn r2218) Indentation 19 years ago
Darkvater c8f07a2dd9 (svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem. 19 years ago
truelight 5a527daac9 (svn r2121) -Fix: changed the 2nd param of AyStar_EndNodeCheck back to what it should be 19 years ago
pasky e76912303c (svn r1998) Give penalty 100 to the AI for using foundations (buildonslopes). This prevents it from building long road lines on foundations unless really necessary. 20 years ago
matthijs 232e41f2ff (svn r1963) - Add: [NPF] Penalty for a red signal that is the last signal on the path.
- Add: [NPF] NPFGetFlag() and NPFSetFlag() to wrap NPF node flag handling
20 years ago
pasky 771bd349cb (svn r1954) Fix: The new AI now does not think it can connect to the road by building its piece of road above the end of a tunnel anymore. 20 years ago
matthijs c5c5c9b17c (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
20 years ago
tron f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 20 years ago
tron 7bbcf5875c (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names 20 years ago
tron 5885b31bb4 (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
tron e5cd6b6193 (svn r1596) Add some more statics 20 years ago
tron d4beff7954 (svn r1548) Move AI_PATHFINDER_IS_ROAD from ai.h to ai_pathfinder.c to avoid global namespace pollution, turn it into a function called IsRoad and improve the commments a bit 20 years ago
tron ae796740aa (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 05a3a83b6c (svn r1475) Fix some more signed/unsigned comparison warnings 20 years ago
tron 49584082a0 (svn r1451) Fix some of the signed/unsigned comparison warnings 20 years ago
tron 7ca6b2b8b0 (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
tron cc465f0f35 (svn r1392) Use TileOffsByDir() instead of home brewed table 20 years ago
tron 32bfe0dddd (svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
While here replace one erroneous TILE_MAX_X with MapMaxY()
20 years ago
miham 57852f6498 (svn r1297) Language fixes in the source.. (ln-) 20 years ago
tron 765ecfed84 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h 20 years ago
truelight eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 20 years ago
truelight 5eba928cb8 (svn r146) -Fix [AI]: Tunnel/bridge bug
-Fix [AI]: Minor problems
-Add [AI]: Profit check (if not making enough money, vehicles are sold)
20 years ago
truelight 309ebe5f3f (svn r111) -Fix: converted all linebreaks to UNIX-linebreak (\n) 20 years ago
truelight 788ace088d (svn r85) -Add: initial commit of new AI (enable in Patch menu)
-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
20 years ago