You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking: a navmesh tile is a 32-byte header (magic MNAV, format
version, generation, fingerprint, the payload's hash and size, and the
field count) followed by tagged fields in name order: DPRT, DTRI, DVRT, POLY, TILE and VERT. Bytes nothing read are gone: the
stored header size, reserved and pad words, the element counts, which
follow from the fields' lengths, and each detail triangle's outline
bits, with mnavDetailTriangle.outline. The loader refuses a field
that is repeated, out of order, empty, not a whole number of records,
or padded with non-zero bytes, and bytes after the last field, with mnav_errorInvalid naming the field's mnavTileSection; an unknown
tag is mnav_errorVersion. MNAV_TILE_FORMAT is 3. Every tile's
bytes and fingerprint change, so a host rebakes its tiles; the meshes
they hold, and so paths and queries, do not change.
(#97)
Breaking: a flight tile takes the same form: a 32-byte header with
the magic MNVF, then the fields FLHT, LEAF, NODE and ROOT,
refused as tiles are. ROOT must hold the def's cube count and FLHT
exactly 56 bytes, and NODE and LEAF are checked against the def's
limits before anything is allocated. MNAV_FLIGHT_FORMAT is 3 and MNAV_FLIGHT_GENERATOR 2. Every flight tile's bytes and fingerprint
change; flight queries do not.
(#98)
Breaking: one bake entry point per input kind. mnavBakeTile and mnavBakeTile2D now take an input record, const mnavBakeInput* and const mnavBake2DInput*, and the forms that took meshes or outlines
alone are removed, as are the names mnavBakeTileInput and mnavBakeTile2DInput. A call that passed meshes alone passes &(mnavBakeInput){meshes, count, NULL, 0, NULL, 0, NULL}. Results do
not change.
(#95)
mnavBakeDef.maxEdgeError's documentation says that walls simplified
a cell or more can cross, that a ring which then does not triangulate
whole loses the area it did not triangulate, and that mnavBakeReport.partialRings counts it.
(#91)
mnavBakeReport.partialRings counts the polygon stage's rings alone:
a detail outline, a simple ring since #109, always triangulates whole.
(#112)
Fixed
Breaking:mnavGenerateLinks refuses a spacing below the
navmesh's cell size with mnav_errorInvalid. A spacing small enough
used to make an out-of-range conversion of each edge's sample count.
Generation now stops with mnav_errorLimit when a landing's search
box meets more than MNAV_MAX_LINK_LANDINGS (32) polygons, which used
to drop that link without a word, or at a link past MNAV_MAX_LINKS.
On a stop, countOut gives the links found so far and the buffer
holds the first of them. Links for a spacing of a cell or more do not
change.
(#116)
Breaking:mnavFindRandomPointAround returns mnav_errorLimit
when a polygon clipped to its circle would have more corners than the
clip holds. Rounding near a cut could add one corner too many, and the
clip wrote past its buffer. Results otherwise do not change.
(#113)
Breaking: the detail stage places each edge sample exactly on its
edge, so a sliver polygon's outline is a simple ring and triangulates
whole, where before a sample rounded off its edge could leave the ring
cut short and counted in partialRings. Polygons sharing an edge
still place the same points. Tile bytes and fingerprints change for
polygons with sloped edges, and MNAV_BAKE_GENERATOR is 3, so a host
rebakes its tiles.
(#109)
A raster cut stops at its piece's room of 12 corners: the bake fails
at rasterizing with mnav_errorLimit instead of writing past the
piece. Rounding of an interpolated corner near a cell line could make
a cut add more corners than exact arithmetic allows. No known bake
reaches it, and every tile is as it was.
(#115)
Every call that reads an mnavCorridor refuses one that is not well
formed, with mnav_errorInvalid, before reading its buffer: a
corridor has a buffer, a capacity of at least 1, and from 1 to
capacity polygons. A count past the capacity used to make the calls
read past the caller's buffer. mnavSetCorridor refuses only a
capacity below 1.
(#114)
mnavRebuildTile compares a cached tile's bake settings in full, not
by a 64-bit hash, so a baker of another def is always refused with mnav_errorInvalid. A cache's tile slots grow by 80 bytes each.
(#90)