From 3d2a1e19e8df5c7bc79bc56db334576140312559 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Wed, 24 Apr 2024 11:52:08 -0700 Subject: [PATCH] Increase pathfinding size --- src/animation.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/animation.cc b/src/animation.cc index b216c54..8230fa1 100644 --- a/src/animation.cc +++ b/src/animation.cc @@ -43,6 +43,8 @@ namespace fallout { #define ANIMATION_SEQUENCE_FORCED 0x01 +#define PATHFINDING_LIMIT 8192 + typedef enum AnimationKind { ANIM_KIND_MOVE_TO_OBJECT = 0, ANIM_KIND_MOVE_TO_TILE = 1, @@ -254,7 +256,7 @@ typedef struct AnimationSad { int field_24; union { unsigned char rotations[3200]; - StraightPathNode straightPathNodeList[200]; + StraightPathNode straightPathNodeList[PATHFINDING_LIMIT]; }; } AnimationSad; @@ -2010,7 +2012,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st v22 += 1; if (v22 == a6) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; } @@ -2063,7 +2065,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st v22 += 1; if (v22 == a6) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; } @@ -2112,7 +2114,7 @@ int _make_straight_path_func(Object* obj, int from, int to, StraightPathNode* st } if (v22 != 0) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; } @@ -2239,7 +2241,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to iteration += 1; if (iteration == 16) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; } @@ -2286,7 +2288,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to iteration += 1; if (iteration == 16) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; } @@ -2329,7 +2331,7 @@ int _make_stair_path(Object* object, int from, int fromElevation, int to, int to } if (iteration != 0) { - if (pathNodeIndex >= 200) { + if (pathNodeIndex >= PATHFINDING_LIMIT) { return 0; }