Repository navigation
v1.1.0
1.1.0 (2026-11-04)
This release changes which walls the wall queries report on a navmesh
with floors over each other, and makes a query context keep the last
path a search gave, so that mnavSetCorridor checks a path against it.
A query context holds 76 bytes more per node. Wall distances and lists
change only where a wall of another floor was reported, and steering
changes only where a corner lies past 2^500 of the origin.
Added
mnavPathgains two fields at its end, which the search that gives
the path sets:query, the context that keeps it, andgeneration,
which of that context's paths it is.
(#334)
Changed
mnavQuery_FindWallDistanceandmnavQuery_FindWallscount a wall
only on the center's floor. They no longer report a wall whose
nearest point is more than the agent's step height below, or more
than the agent's height above, the center's height on its polygon,
for the agent the navmesh's tiles are baked for. There is no new
setting, and a center off its polygon is taken at its own height.
Both calls keep the whole radius and one search, so
mnavQuery_FindWallsstill lists every wall it counts, nearest
first, and its first ismnavQuery_FindWallDistance's. On a two-floor
building, a point on the ground under the upper floor's edge was
given that edge, 0.60 m away on the ground and 3 m overhead, where
its nearest ground wall is 1.38 m away; it now gets the ground wall.
(#340)- A query context holds 76 bytes more per node of
limits.nodes, plus
24 bytes, for the kept path's arrays: about 23% more than the 332
bytes per node it held, 623 KB more at the default 8192 nodes. Hosts
that size their contexts by memory should allow for it.
(#334) - The headers of
mnavDebugPath,mnavDebugFlightPathandmnavSteer
say the value they take may be the caller's own: its arrays are the
caller's memory, read only within the counts given, every point
checked;mnavSteercompares a link'spointand never follows it.
(#335)
Fixed
mnavSetCorridortrusted the pointers and counts of a path handed
back to it. A count copied from a longer path read past the
context's buffer: a path from a context of 4 nodes given the polygon
count of a 10-polygon path read 120 bytes past it. A path's arrays
also did not last until the context's next search as documented:
mnavQuery_FindCorridorCornersandmnavQuery_FindCorridorAreas
wrote their corners over a path's points and links, and
mnavQuery_RaycastandmnavQuery_MoveAlongSurfacetheir polygons
over its corridor, so a path loaded after a raycast with the same
context gavemnav_successwith the ray's polygons, and a flight
path's points changed when the same context then found a corridor's
corners. A query context now keeps the last path a search gave in
arrays only a search writes, andmnavSetCorridorchecks the path
against its context before reading any array:mnav_errorStalewhen
a later search of the context has replaced it, and
mnav_errorInvalidfor a path with no context, arrays other than the
ones the context keeps, or more polygons, points or links than it
kept. The corridor is unchanged on any failure.
(#334)mnavDebugPathandmnavDebugFlightPathare documented to refuse a
path with no points withmnav_errorInvalid, but a path whose
pointCountwas 0 drew nothing and returnedmnav_success. They
now refuse a path with fewer than one point, and with no array.
(#335)mnavSteeraccepts any finite corner, but the ground distance
between two finite corners could overflow: with corners
(-1e308, 0, 0)then(1e308, 0, 0)it returnedmnav_steerMoving
with a velocity whose x was NaN, and with corners around 1e200 a zero
velocity, still reported as moving. Each pair of corners is now
measured on its own, a far pair by half its difference scaled by a
power of two, so no two finite corners overflow. Every result where
all corners lie within 2^500 of the origin is bit for bit unchanged.
Distances between near corners no longer depend on a far corner
elsewhere in the list. Anticipating a turn toward a corner past about
1e154 m, where the turn was lost to the overflow, now swings wide as
it does for the same turn nearer.
(#337)