Michael Lutz
ddf6f33a8a
Change: Path signals now show green on junction-less tracks by default ( #12857 )
2024-07-26 23:51:49 +02:00
David Seifert
db36e61807
Codefix: Compilation with GCC 15 due to missing CRTP usage ( #12876 )
2024-07-22 20:42:23 +02:00
Koen Bussemaker
a0845bba2c
Codechange: Reduced size of water region by not storing tile area
2024-07-01 11:10:20 +02:00
Jonathan G Rennison
9c84e5df3f
Add: Road waypoint functionality
2024-06-24 22:12:08 +02:00
Rubidium
31085230a6
Codechange: use std::vector for the available neighbours
2024-05-30 23:15:38 +02:00
Rubidium
2864f3b3eb
Cleanup: remove C-style hash, binary heap and priority queue
2024-05-30 23:15:38 +02:00
Rubidium
0e75dfd49f
Codechange: migrate aystar to use YAPF's nodelist infrastructure
2024-05-30 23:15:38 +02:00
Koen Bussemaker
6efc1fa250
Codechange: Removed unused yapf PfNodeCachFlush function
2024-05-25 21:49:12 +02:00
Rubidium
6cea49c117
Codechange: replace uint with size_t in binary heap
2024-05-12 12:55:52 +02:00
Rubidium
8349203038
Cleanup: remove unused Aystar variables
2024-05-12 10:46:03 +02:00
merni-ns
c3ee5e58a3
Cleanup: Move remaining NPF files into pathfinder directory
2024-05-10 10:38:44 +02:00
merni-ns
55a7c59d13
Remove: NPF and pathfinder change settings
2024-05-10 10:38:44 +02:00
Koen Bussemaker
59ac27f385
Fix #12643 : _is_water_region_valid is not cleared/reset in AllocateWaterRegions
2024-05-09 20:18:04 +02:00
Koen Bussemaker
d2f98440bb
Codechange: Make assert in follow_track easier to understand and debug
2024-05-05 16:30:44 +02:00
Peter Nelson
d074ab909c
Codechange: Replace Array/FixedSizeArray with std::deque. ( #12409 )
...
Array/FixedSizeArray is actually a resizeable container that allocates space in chunks and allows resizing without invalidating pointers.
This is also a behaviour of std::deque, so use that instead.
2024-05-04 10:55:16 +01:00
Koen Bussemaker
ef99aa81a3
Codechange: Store validity of water regions in separate vector
2024-05-02 15:03:48 +02:00
Patric Stout
1005c86c62
Codechange: record cache warnings with a "warning" prefix ( #12518 )
2024-04-17 19:49:55 +00:00
Koen Bussemaker
257d312a58
Fix #12228 , Fix #12231 : CheckShipReverse only restricts path when it has to
2024-04-16 20:21:18 +02:00
Rubidium
2587a21400
Codechange: use zero-initialization instead of C-style loop
2024-04-11 07:05:04 +02:00
SamuXarick
f845b4bbc3
Fix: Changing NPF max search nodes while in-game had no effect ( #12194 )
2024-03-25 17:28:16 +01:00
Jonathan G Rennison
2189607c34
Codechange: Reduce size of class WaterRegion
...
The tile patch array is 256 bytes and is not needed for the majority
of water regions, change it to be optional via std::unique_ptr
2024-03-21 21:14:30 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
SamuXarick
d7c5e9e8ab
Codechange: Where the ship comes from is already known
...
This simplifies the handling of variables.
`ChooseShipTrack` is called upon entering `tile`, and looking further back to the caller, it can be deduced that `v->tile` matches `src_tile`. With that said, `enterdir` can also be removed, as it's not used anywhere else.
`CreateRandomPath` and `GetRandomFollowUpTrackdir` is being fed `src_tile` as it's 2nd parameter. This could be eliminated, as `v` is also being passed to it. Just use `v->tile` in those functions.
2024-03-16 17:02:19 +01:00
Patric Stout
5f4f9334ce
Codefix f1e999ec: use RandomRange(l) instead of _random.Next(l) ( #12274 )
2024-03-16 14:39:57 +00:00
SamuXarick
a7625b8ae0
Fix #12280 : Allow ships 90 degree turns if only choice
...
If there is no path found, a random path is created which forbids 90 degrees.
Allow 90 degrees if they're the only choice.
2024-03-15 08:04:08 +01:00
SamuXarick
14d95ef1c9
Fix #12279 : Update random path each step ( #12286 )
2024-03-13 11:22:52 -04:00
Koen Bussemaker
984202b101
Codechange: Remove outdated YAPF example code
2024-03-11 20:25:48 +01:00
Rubidium
27eadc13ec
Codechange: rename TILE_ADD(XY) to TileAdd(XY)
2024-03-10 15:50:24 +01:00
Kuhnovic
005892bfdb
Fix #12250 : YAPF Trivial rail pathfinding crashes due to #12217 ( #12258 )
2024-03-10 14:37:56 +00:00
Kuhnovic
08ff1ab93e
Fix #12236 : Ship pathfinder causes crash when ship is already at destination ( #12238 )
2024-03-08 23:46:13 +01:00
Kuhnovic
30e1a61c04
Fix: YAPF doesn't check destination for start nodes ( #12217 )
2024-03-08 14:23:33 +01:00
Peter Nelson
b2ca6e1ac8
Codefix: Remove no-longer used ship special-case. ( #12192 )
...
This special-case has not been triggered since multi-tile docks were introduced.
2024-03-03 09:31:04 +00:00
Kuhnovic
c5afc9173c
Fix #12176 : Ships are circling in one place ( #12181 )
2024-03-02 21:45:54 +01:00
Kuhnovic
2fb1593550
Fix e38c3c5: Added missing return statement ( #12185 )
2024-02-27 12:55:42 +01:00
Koen Bussemaker
8a1cea2ab6
Codechange: Skip non-water water region patches in neigbor search
2024-02-18 11:46:34 +01:00
Kuhnovic
e38c3c59f3
Fix #11840 : Ship pathfinder always returns a valid trackdir if one is available ( #12031 )
2024-02-09 12:31:38 -05:00
Tyler Trahan
16e6da020d
Cleanup: Remove unnecessary Trackdir casts ( #12038 )
2024-02-08 09:46:55 -05:00
Koen Bussemaker
35c89d57f8
Codechange: Added debug printing for Water Regions
2024-02-04 22:50:04 +01:00
Koen Bussemaker
4b94457bf1
Fix #11802 : Made determining water region edge traversability more robust
2024-02-04 22:50:04 +01:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Kuhnovic
8a4a99b7e8
Fix #5713 : FindClosestShipDepot only considers depots that are actually reachable ( #11768 )
2024-01-27 15:06:14 +01:00
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
2024-01-21 20:56:50 +00:00
Rubidium
6b21368bc2
Codechange: replace FIND_FIRST_BIT/FindFirstBit2x64 with FindFirstBit
2024-01-19 21:10:39 +01:00
Tyler Trahan
68814bd912
Codechange: Rename SIGTYPE_NORMAL to SIGTYPE_BLOCK ( #11788 )
2024-01-15 15:27:48 -05:00
Jonathan G Rennison
86b046cd26
Fix: Incorrect assertion in GetTileIndexFromLocalCoordinate ( #11747 )
2024-01-10 00:20:34 +00:00
Jonathan G Rennison
09eefd6e95
Cleanup: Remove unused constant YAPF_SHIP_PATH_CACHE_LENGTH
2024-01-09 20:58:51 +01:00
Kuhnovic
f1e999ec59
Feature: Region-based pathfinder for ships ( #10543 )
2024-01-08 20:29:05 +01:00
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
2024-01-06 13:37:33 +01:00
Rubidium
e3f49ee7a0
Codechange: coding style fixes
2024-01-04 16:23:54 +01:00
SamuXarick
c05ffb22bd
Fix #10452 : Don't let AyStar max_search_nodes unattended when initializing ( #11544 )
...
Add a constant with the default value of 10000 and have the pathfinding settings refer to it.
Add a preventative method to AyStar when it's initializing, to limit the number of max_search_nodes if left unattended.
2023-12-17 22:50:53 +01:00