Recast: add missing mset version directive

Not for MSET < 7.
This commit is contained in:
Amos 2024-07-26 00:25:10 +02:00
parent 034c0f07d4
commit d669d18a86
2 changed files with 4 additions and 0 deletions

View File

@ -229,12 +229,14 @@ struct dtPoly
/// The poly surface area. (Quantized by #DT_POLY_AREA_QUANT_FACTOR).
unsigned short surfaceArea;
#if DT_NAVMESH_SET_VERSION >= 7
// These 2 are most likely related, it needs to be reversed still.
// No use case has been found in the executable yet, its possible these are
// used internally in the editor. Dynamic reverse engineering required to
// confirm this.
unsigned short unk1;
unsigned short unk2;
#endif
/// The center of the polygon; see abstracted script function 'Navmesh_RandomPositions'.
float center[3];

View File

@ -296,10 +296,12 @@ bool dtCreateDisjointPolyGroups(dtNavMesh* nav, dtDisjointSet& disjoint)
dtPoly& poly = tile->polys[j];
poly.groupId = DT_NULL_POLY_GROUP;
#if DT_NAVMESH_SET_VERSION >= 7
// NOTE: these fields are unknown and need to be reversed.
// It is possible these are used internally only.
poly.unk1 = (unsigned short)-1;
poly.unk2 = (unsigned short)-1;
#endif
}
}