Fix node cover mask

This commit is contained in:
smallmodel 2024-10-08 21:00:01 +02:00
parent dcd9ce91a8
commit 5ec106642d
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 5 additions and 12 deletions

View file

@ -2328,7 +2328,7 @@ void PathSearch::PlayerCover(Player *pPlayer)
for (i = 0; i < nodecount; i++) {
node = pathnodes[i];
if (!node || !(node->nodeflags & AI_COVERFLAGS)) {
if (!node || !(node->nodeflags & AI_MOVE_MASK)) {
continue;
}

View file

@ -141,17 +141,10 @@ typedef enum {
// Added in 2.0
#define AI_LOW_WALL_ARC 256
#define AI_COVERFLAGS \
(AI_CRATE | AI_SNIPER | AI_CORNER_RIGHT | AI_CORNER_LEFT | AI_CONCEALMENT | AI_COVER | AI_LOW_WALL_ARC)
#define AI_COVERFLAGS2 (AI_SNIPER | AI_CORNER_RIGHT | AI_CORNER_LEFT | AI_CONCEALMENT)
#define AI_COVERFLAGS3 (AI_SNIPER | AI_CORNER_RIGHT | AI_CORNER_LEFT | AI_CONCEALMENT | AI_DUCK | AI_CONCEALMENT)
#define AI_SNIPERFLAGS (AI_SNIPER | AI_CORNER_RIGHT | AI_CORNER_LEFT | AI_COVER)
#define AI_CRATEFLAGS (AI_CRATE | AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_CONCEALMENT | AI_COVER | AI_DUCK)
#define AI_COVER_LEFT_FLAGS (AI_CRATE | AI_SNIPER | AI_CORNER_LEFT | AI_CONCEALMENT | AI_DUCK)
#define AI_COVER_RIGHT_FLAGS (AI_CRATE | AI_SNIPER | AI_CORNER_RIGHT | AI_CONCEALMENT | AI_DUCK)
#define AI_COVER_MASK (AI_CRATE | AI_CORNER_RIGHT | AI_CORNER_LEFT | AI_CONCEALMENT | AI_COVER)
#define AI_CONCEALMENT_MASK (AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_CRATE | AI_LOW_WALL_ARC)
#define AI_ALL (AI_DUCK | AI_COVER | AI_CONCEALMENT | AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_SNIPER | AI_CRATE)
#define AI_MOVE_MASK \
(AI_COVER | AI_CONCEALMENT | AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_SNIPER | AI_CRATE | AI_LOW_WALL_ARC)
#define AI_COVER_MASK (AI_COVER | AI_CONCEALMENT | AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_CRATE | AI_LOW_WALL_ARC)
#define AI_CONCEALMENT_MASK (AI_CORNER_LEFT | AI_CORNER_RIGHT | AI_CRATE | AI_LOW_WALL_ARC)
void DrawNode(int iNodeCount);
void DrawAllConnections(void);