Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
2023-05-04 13:14:12 +00:00
Rubidium
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
Nicolas Chappe
7e7d943526
Codechange: [YAPF] Allow to retrieve the final tile of the calculated path
2022-10-22 14:19:08 +02:00
Nicolas Chappe
227626b0b7
Change: [YAPF] All compatible depots are targets for 'any depot' orders
2022-10-22 14:19:08 +02:00
Loïc Guilloux
6ff0858b38
Fix #9669 , cbe00ec: Only try valid reverse directions ( #9672 )
2021-11-06 17:32:37 +01:00
glx22
cbe00ec651
Fix: Try all possible reverse directions when a ship reaches a dead end
2021-10-11 21:11:13 +02:00
Loïc Guilloux
11dece205c
Revert 7ca1793: Using Trackdir keyed node is not required, Exitdir keyed node still have the correct trackdir ( #9576 )
2021-09-26 18:41:41 +02:00
Patric Stout
f87fe395a7
Fix: pathfinders always tried to avoid docking tiles (even if nothing was on them) ( #9522 )
...
When coming across any docking tile (for example, all tiles around
an oilrig are docking tiles), it always at least added a penalty
of 3 times a normal tile, even when there are no ships on them.
In result, the pathfinder got suggested to always go around docking
tiles. This was most likely not the intention of the change made in
31db4f8d5e
.
2021-08-31 09:57:44 +02:00
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
2021-06-13 12:45:45 +02:00
Vít Šefl
0125ba82e8
Fix: Do not send vehicles towards incomplete PF nodes
...
YAPF could end up in a situation where it sets the best intermediate node
to a node whose construction is never finalized (i.e. it is never added to
the open list). The content of the node would be overwritten in the next
round, potentially sending the vehicle to an unwanted location.
2021-05-29 19:00:47 +02:00
rubidium42
9197de39e4
Cleanup: remove unused copy-constructor without copy-assignment
2021-05-27 18:30:56 +02:00
Vít Šefl
33d99d27f4
Fix: Encountering two-way red signals could prune unrelated branches.
...
The intermediate node branch is now only pruned if the node is on the
path leading to the two-way red signal.
2021-05-23 20:19:39 +02:00
Patric Stout
665a3928e2
Remove: performance measurements in YAPF
...
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.
Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
2021-04-30 12:48:41 +02:00
Patric Stout
e162aff7a3
Cleanup: remove weird left-over comment in yapf.hpp
2021-04-30 12:48:41 +02:00
Charles Pigott
e8a94dc8bb
Cleanup: Delete remaining Blob code
2021-04-04 08:01:54 +01:00
Charles Pigott
e8022a589d
Codechange: Replace CBlobT usage with std::vector
2021-04-04 08:01:54 +01:00
Charles Pigott
f481c9fc2c
Codechange: Replace CStrA with std::string
2021-04-04 08:01:54 +01:00
Patric Stout
d4583fa64c
Fix #8123 : trams on half-tiles couldn't find depots ( #8738 )
...
Basically, follow_track.hpp contains a fix for half-tiles, but
this wasn't duplicated for when trying to find a depot and in
a few other places. This makes sure all places act the same.
2021-02-25 22:46:46 +01:00
Charles Pigott
80fb1c74f0
Change: Make pathfinder account for maximum order speed, if set
2021-02-22 00:25:47 +00:00
Charles Pigott
1d6a0c7b52
Fix: [YAPF] Road pathfinder did not account for length of tunnel/bridge in path cost
...
Copy calculations from the rail pathfinder
2021-02-21 10:53:25 +00:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Patric Stout
56d54cf60e
Add: introduce CMake for project management
...
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Jonathan G Rennison
1a88fb5c91
Fix #7592 : Do not cache road vehicle path within 8 tiles of destination with multiple entrances
...
Ported from jgrpp commit 79d5be7e265df3be8b73d484f0c7261b3c23229d
2020-02-07 23:02:10 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Charles Pigott
71a3e83468
Fix: GCC9's warnings about deprecated implicit assignment operators
2019-09-30 14:00:06 +01:00
peter1138
0db31ae27f
Change: Avoid caching end of ship path, to allow penalties to apply.
2019-06-30 16:46:32 +02:00
peter1138
31db4f8d5e
Add: Penalty for occupied docking points.
2019-06-30 16:46:32 +02:00
peter1138
f538179878
Feature: Multi-tile docks and docking points.
2019-06-30 16:46:32 +02:00
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
2019-05-01 21:36:27 +02:00
Charles Pigott
9f3928658b
Codechange: Remove Track{dir,}{Bits,}Byte types
2019-04-29 17:40:22 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
PeterN
6c6971fb43
Add: Road vehicle path cache. ( #7261 )
2019-03-08 23:52:45 +00:00
Peter Nelson
7ca1793ec4
Change: Automatically use Trackdir node key as needed if ship curve penalties differ.
2019-03-08 16:52:08 +01:00
Peter Nelson
b8a0107ad1
Change: Add configurable curve penalty for ships.
2019-03-08 16:52:08 +01:00
Peter Nelson
3f327116db
Change: Don't apply forbid 90 deg turn settings to ships.
2019-03-03 20:59:44 +01:00
J0an Josep
a5836874ef
Codechange: Use track functions.
2019-01-26 22:55:12 +00:00
Peter Nelson
81330b8d6e
Change: Add path cache for ships.
2019-01-19 23:11:17 +00:00
Juanjo!
1db66a285e
Codechange: [YAPF] Stop looking for an automatic servicing road depot when the cost of a path exceeds max. penalty.
2019-01-06 16:47:45 +01:00
Charles Pigott
b5028efc1f
Fix: Protect against a few out of bounds or uninitialised usage errors
2018-10-31 12:41:49 +01:00
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
J0anJosep
d01c09fb73
Codechange: Use HasTrack(dir) to improve code readability.
2018-06-27 23:14:30 +02:00
J0anJosep
31ac11bddb
Codechange: Increase readability of track functions and pathfinders.
2018-06-27 23:14:30 +02:00
J0anJosep
79a551a83c
Codechange: Use TileAddBy(Diag)Dir when possible.
2018-04-30 18:55:04 +02:00
Patric Stout
17bd580630
Remove: NO_DEBUG_MESSAGES was only read and setting it broke compilation ( #6703 )
...
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action
This fixes #6652 .
2018-04-11 22:07:21 +02:00
frosch
b4b98e5165
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
2017-08-13 18:38:42 +00:00
frosch
35d8c37102
(svn r27885) -Cleanup (r27844): ESR_MAX_COST_EXCEEDED and ESR_PATH_TOO_LONG meant the same thing, but only one was used. Keep PATH_TOO_LONG since it has the better documentation.
2017-06-22 16:57:06 +00:00
peter1138
bf4499c643
(svn r27846) -Fix [FS#5926]: Infinite loop in pathfinder when checking safe waiting position from a waypoint.
2017-04-04 00:00:43 +00:00
peter1138
1eef97674c
(svn r27845) -Change: (Yapf) Use FindDepotData struct to simplify depot finding code and remove need to return fake path distance. (juanjo)
2017-04-03 22:02:28 +00:00
peter1138
9bc27c9a72
(svn r27844) -Change: (Yapf) Treat max cost exceeded separately from path too long condition, as destination should not be considered in the former case.
2017-04-03 21:53:51 +00:00