Increase pathfinding size

This commit is contained in:
Marco Cawthorne 2024-04-24 11:52:08 -07:00
parent 9fb917c357
commit 3d2a1e19e8
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 9 additions and 7 deletions

View File

@ -43,6 +43,8 @@ namespace fallout {
#define ANIMATION_SEQUENCE_FORCED 0x01 #define ANIMATION_SEQUENCE_FORCED 0x01
#define PATHFINDING_LIMIT 8192
typedef enum AnimationKind { typedef enum AnimationKind {
ANIM_KIND_MOVE_TO_OBJECT = 0, ANIM_KIND_MOVE_TO_OBJECT = 0,
ANIM_KIND_MOVE_TO_TILE = 1, ANIM_KIND_MOVE_TO_TILE = 1,
@ -254,7 +256,7 @@ typedef struct AnimationSad {
int field_24; int field_24;
union { union {
unsigned char rotations[3200]; unsigned char rotations[3200];
StraightPathNode straightPathNodeList[200]; StraightPathNode straightPathNodeList[PATHFINDING_LIMIT];
}; };
} AnimationSad; } AnimationSad;
@ -2010,7 +2012,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st
v22 += 1; v22 += 1;
if (v22 == a6) { if (v22 == a6) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }
@ -2063,7 +2065,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st
v22 += 1; v22 += 1;
if (v22 == a6) { if (v22 == a6) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }
@ -2112,7 +2114,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st
} }
if (v22 != 0) { if (v22 != 0) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }
@ -2239,7 +2241,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to
iteration += 1; iteration += 1;
if (iteration == 16) { if (iteration == 16) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }
@ -2286,7 +2288,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to
iteration += 1; iteration += 1;
if (iteration == 16) { if (iteration == 16) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }
@ -2329,7 +2331,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to
} }
if (iteration != 0) { if (iteration != 0) {
if (pathNodeIndex >= 200) { if (pathNodeIndex >= PATHFINDING_LIMIT) {
return 0; return 0;
} }