Recast: update dtNode parent bit counts

DT_NODE_PARENT_BITS has been changed to 19 in r2 and r5. All bit masks align 1:1 after this change. DT_NODE_STATE_BITS is confirmed to be 2 by r2's implementation of dtNavMeshQuery::isInClosedList. dtNode::flags is 3 bits as the bitmask constants compiled in after changing DT_NODE_PARENT_BITS, are identical for all enumerants of dtNodeFlags.
This commit is contained in:
Kawe Mazidjatari 2024-07-02 01:24:46 +02:00
parent 3511998837
commit 02aa7acd4a

View File

@ -23,15 +23,15 @@
enum dtNodeFlags
{
DT_NODE_OPEN = 0x01,
DT_NODE_CLOSED = 0x02,
DT_NODE_PARENT_DETACHED = 0x04, // parent of the node is not adjacent. Found using raycast.
DT_NODE_OPEN = (1<<0),
DT_NODE_CLOSED = (1<<1),
DT_NODE_PARENT_DETACHED = (1<<2), // parent of the node is not adjacent. Found using raycast.
};
typedef unsigned short dtNodeIndex;
static const dtNodeIndex DT_NULL_IDX = (dtNodeIndex)~0;
static const int DT_NODE_PARENT_BITS = 24;
static const int DT_NODE_PARENT_BITS = 19;
static const int DT_NODE_STATE_BITS = 2;
struct dtNode
{