Skip to content

Commit 9ef44c8

Browse files
committed
[ZH] Scuff the Pathing so it runs like retail before getting caught in crashing areas and resetting to use fixed pathfinding
1 parent 40fe82e commit 9ef44c8

File tree

2 files changed

+424
-89
lines changed

2 files changed

+424
-89
lines changed

GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
//#include "GameLogic/Locomotor.h" // no, do not include this, unless you like long recompiles
3838
#include "GameLogic/LocomotorSet.h"
3939
#include "GameLogic/GameLogic.h"
40+
#include "Common/GameDefines.h"
4041

4142
class Bridge;
4243
class Object;
@@ -50,6 +51,10 @@ class PathfindZoneManager;
5051

5152
#define INFANTRY_MOVES_THROUGH_INFANTRY
5253

54+
// TheSuperHackers @info This is here to easily toggle the retail compatible hacks for the pathfinding
55+
#if RETAIL_COMPATIBLE_CRC
56+
#define RETAIL_COMPATIBLE_PATHFINDING (1)
57+
#endif
5358

5459
typedef UnsignedShort zoneStorageType;
5560

@@ -208,6 +213,9 @@ class PathfindCellInfo
208213
{
209214
friend class PathfindCell;
210215
public:
216+
#if RETAIL_COMPATIBLE_PATHFINDING
217+
static void forceCleanPathFindInfoCells(void);
218+
#endif
211219
static void allocateCellInfos(void);
212220
static void releaseCellInfos(void);
213221

@@ -699,6 +707,9 @@ class Pathfinder : PathfindServicesInterface, public Snapshot
699707
Path *getDebugPath( void );
700708
void setDebugPath( Path *debugpath );
701709

710+
#if RETAIL_COMPATIBLE_PATHFINDING
711+
void forceCleanCells(void);
712+
#endif
702713
void cleanOpenAndClosedLists(void);
703714

704715
// Adjusts the destination to a spot near dest that is not occupied by other units.

0 commit comments

Comments
 (0)