Skip to content
Open
4 changes: 4 additions & 0 deletions Core/GameEngine/Include/Common/GameDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
#define RETAIL_COMPATIBLE_PATHFINDING (0)
#endif

#ifndef USE_ACCURATE_SPHERE_TO_RECT
#define USE_ACCURATE_SPHERE_TO_RECT (0) // Use Accurate Sphere to Rect Collision Detection
#endif

// This is essentially synonymous for RETAIL_COMPATIBLE_CRC. There is a lot wrong with AIGroup, such as use-after-free, double-free, leaks,
// but we cannot touch it much without breaking retail compatibility. Do not shy away from using massive hacks when fixing issues with AIGroup,
// but put them behind this macro.
Expand Down
24 changes: 23 additions & 1 deletion GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ enum DistanceCalculationType CPP_11(: Int)
FROM_BOUNDINGSPHERE_3D = 3 ///< measure from Object bounding sphere in 3d.
};

//=====================================
/** */
//=====================================
enum HeightBoundaryCheckType CPP_11(: Int)
{
DEFAULT_HEIGHT_CHECK = 0,
SKIP_HEIGHT_CHECK = 1,
BOUNDARY_HEIGHT_CHECK = 2
};

//=====================================
/**
a Plain Old Data structure that is used to get optional results from collidesWith().
Expand All @@ -162,6 +172,16 @@ struct CollideLocAndNormal
{
Coord3D loc;
Coord3D normal;
#if !RETAIL_COMPATIBLE_CRC && !PRESERVE_RETAIL_BEHAVIOR
Real distSqr;
HeightBoundaryCheckType heightCheck;

CollideLocAndNormal() : distSqr(0.0f), heightCheck(DEFAULT_HEIGHT_CHECK)
{
loc.zero();
normal.zero();
}
#endif
};

//=====================================
Expand Down Expand Up @@ -1442,7 +1462,9 @@ class PartitionManager : public SubsystemInterface, public Snapshot
Real angle1,
const Coord3D* pos2,
const GeometryInfo& geom2,
Real angle2
Real angle2,
HeightBoundaryCheckType heightCheckType = DEFAULT_HEIGHT_CHECK,
Real *abDistSqr = NULL
) const;

/// finding legal positions in the world
Expand Down
Loading
Loading