From 10f6d8f2b01c646f8016fd7d80b80af4355034e5 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 16 Sep 2025 18:12:45 +0100 Subject: [PATCH] Default pathfinding to A* to avoid older client crashes --- api.lua | 4 ++-- settingtypes.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api.lua b/api.lua index a369cf2..53886f8 100644 --- a/api.lua +++ b/api.lua @@ -18,7 +18,7 @@ end -- global table mobs = { - mod = "redo", version = "20250824", + mod = "redo", version = "20250916", spawning_mobs = {}, translate = S, node_snow = has(core.registered_aliases["mapgen_snow"]) or has("mcl_core:snow") or has("default:snow") or "air", @@ -88,7 +88,7 @@ local pathfinding_stuck_timeout = tonumber( settings:get("mob_pathfinding_stuck_timeout")) or 3.0 local pathfinding_stuck_path_timeout = tonumber( settings:get("mob_pathfinding_stuck_path_timeout")) or 5.0 -local pathfinding_algorithm = settings:get("mob_pathfinding_algorithm") or "Dijkstra" +local pathfinding_algorithm = settings:get("mob_pathfinding_algorithm") or "A*_noprefetch" if pathfinding_algorithm == "AStar_noprefetch" then pathfinding_algorithm = "A*_noprefetch" diff --git a/settingtypes.txt b/settingtypes.txt index 37539e1..2bce7a7 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -77,11 +77,11 @@ mob_pathfinding_stuck_timeout (How long before stuck mobs start searching) float # How long will mob follow path before giving up (default 5.0) mob_pathfinding_stuck_path_timeout (How long will mob follow path before giving up) float 5.0 # Which pathfinding algorithm to use -# - Dijkstra (default) +# - Dijkstra # - A*_noprefetch (AStar_noprefetch) -# - A* (AStar) +# - A* (AStar) Default # (A* names differ cause Minetest doesn´t allow "*" in settings) -mob_pathfinding_algorithm (pathfinding algorithm) enum Dijkstra Dijkstra,AStar_noprefetch,AStar +mob_pathfinding_algorithm (pathfinding algorithm) enum Astar Dijkstra,AStar_noprefetch,AStar # max search distance from search positions (default 16) mob_pathfinding_searchdistance (path search distance) int 16 # max jump height for pathfinding (default 4)