Commit Graph

20 Commits (4bd95d756e86b978e8f6ac9e246f820d28133bb9)

Author SHA1 Message Date
matthijs 4bd95d756e (svn r2159) - Fix: [NPF] Road vehicles never found their target station or depots (introduced in r2154)
- Fix: [NPF] Trains still tried to go through the back of depots.
20 years ago
matthijs 92fe22382a (svn r2154) - Fix: [NPF] Vehicles should no longer try to drive through the back of depots and road stations.
- Add: GetDepotDirection() wrapper function.
- Fix: [NPF] Ships can now actually reach buoys.
20 years ago
matthijs ead34df653 (svn r2148) - Add: [NPF] Trains can now plan taking into account that they can reverse in depots. This makes forced servicing tracks work with NPF. 20 years ago
matthijs 6c825df8f7 (svn r2147) - Add: [NPF] Give red presignal exit signals a different (higher) penalty, to discourage trains from waiting at presignal exits. 20 years ago
truelight 5a527daac9 (svn r2121) -Fix: changed the 2nd param of AyStar_EndNodeCheck back to what it should be 20 years ago
matthijs c2fea7b3c6 (svn r2007) - Fix: [NPF] Slope penalties did not work correctly with foundations. (HackyKid)
- Fix: [NPF] Stations penalties were not applied correctly, since stations had no base cost. (HackyKid)
- Fix: [NPF] Lastred penalty was applied multiple times for every red signal, instead of just the last one. (HackyKid)
20 years ago
matthijs d631b1fa8c (svn r2006) - Fix: [NPF] Wrong signal detection for last signal red detection. Multiple tracks per tile with only one signal were detected wrong. (HackyKid) 20 years ago
matthijs b7747b50ce (svn r1968) - Fix: [NPF] Mixed declarations and statements 20 years ago
pasky 0e367ba541 (svn r1967) Codechange: A mix of mostly indentation-related tidyups. 20 years ago
matthijs aea57f2026 (svn r1964) - Add: [NPF] Added a penalty 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 f2e45daf54 (svn r1957) Compilation fix. 20 years ago
matthijs b43a52128f (svn r1956) -Fix: [NPF] New target tile for heuristic should perform better with larger stations (HackyKid) 20 years ago
matthijs 5df36d4ead (svn r1843) - Codechange: [NPF] Removed some unused code. 20 years ago
tron be840ccd00 (svn r1842) Fix another typo made in r1834 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
truelight e9c93f9c0c (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 f0f85a7ef3 (svn r1803) Move debugging stuff into files of it's own 20 years ago
darkvater 9776f2350b (svn r1752) - Fix: MSVC acting up once again, as well as project file updates for the missing files. 20 years ago
matthijs a2dec6c32a (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