4 Commits
Author SHA1 Message Date
Anders Jenbo 1c76897f2c Apply simple const rules using clang-tidy 2025-08-16 01:21:36 +02:00
Gleb Mazovetskiy 3e6b501d82 Fix pathfinding and increase player path limit
The previous implementation didn't behave quite like A-* is supposed to.

After trying to figure out what's causing it and giving up,
I've reimplemented it in a straightforward manner.
Now it seems to work a lot better.

Also increases maximum player path length to 100 steps.
We still only store the first 25 steps in the save file for vanilla
compatibility.
2025-01-26 17:38:05 +01:00
Gleb Mazovetskiy 471a448f09 test/path_benchmark.cpp: Add another benchmark 2025-01-26 17:38:05 +01:00
Gleb Mazovetskiy de28cc3167 Add a pathfinding benchmark
Example run:

```
$ tools/build_and_run_benchmark.py path_benchmark

--------------------------------------------------------
Benchmark              Time             CPU   Iterations
--------------------------------------------------------
BM_SinglePath       2905 ns         2905 ns       241038
BM_Bridges         65951 ns        65948 ns         9785
BM_NoPath         131397 ns       131390 ns         5247
```
2025-01-25 14:11:40 +00:00