Commit graph

8 commits

Author SHA1 Message Date
Jordan Leppert
35069011d6 Pathfinding Fixes
mob_meta.get_node_height:
Moved to pathfinding, and made public (creatura.get_node_height).
Now uses collision box rather than node box, if available, unless flag specifies not to.
Fix for getting node height for nodes with connected node boxes

pathfinding.get_ground_level:
We now have one copy between pathfinding and mob_meta.
Can check a larger range of nodes at different heights.
Takes into account node height of both target node, and the height of the node we're coming from.

pathfinding.get_neighbors:
Get maximum distance mob can travel up/down from mob stepheight.
Improved checking diagonals are clear.
Improved checking vertical clearance, takes into account height of current and target node.
Vertical clearance can cope with nodes that have a different collision and node boxes, like snow.
Vertical clearance has a tiny height adjustment so a 2 node heigh entity can fit through a 2 node gap.
Fixed bug where it was assumed a node was reachable if it's the end goal.

methods.movement_theta_pathfind and movement_pathfind:
Fixed bug that raised goal pos by 0.5 nodes.
2022-02-22 15:16:33 +00:00
Jordan Leppert
3bb1119017 Texture mod fix 2022-02-20 21:35:36 +00:00
ElCeejo
8273f25207 Fix multiple warnings, Add shallow walkable node check, Improve get_wander_pos 2022-02-20 11:37:39 -08:00
ElCeejo
43c124db15
Merge pull request #3 from JordanL2/spawn_cap
Spawning fixes: Min/max radius, node light check, spawn cap, biome check
2022-02-16 18:20:39 -08:00
Lars Mueller
6ffde2fc17 Fix checks for water & fire groups 2022-02-16 21:58:05 +01:00
Lars Mueller
8b0e23f97e Fix crash with unknown or ignore nodes 2022-02-16 21:57:05 +01:00
Jordan Leppert
10d250fdbf Mob despawn_after defaults to never 2022-02-16 15:34:17 +00:00
ElCeejo
c251f07ae5
Initial Commit 2022-02-10 16:32:53 -08:00