diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp index 9075db74aa..6861406488 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp @@ -672,12 +672,15 @@ void AISkirmishPlayer::buildAIBaseDefenseStructure(const AsciiString &thingName, Real s = sin(angle); Real c = cos(angle); - DEBUG_LOG(("Angle is %f sin %f, cos %f \n", 180*angle/PI, s, c)); +// TheSuperHackers @info helmutbuhler 21/04/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC + DEBUG_LOG(("Angle is %f sin %f, cos %f \n", 180*angle/PI, s, c)); DEBUG_LOG(("Offset is %f %f, new is %f, %f \n", offset.x, offset.y, offset.x*c - offset.y*s, offset.y*c + offset.x*s - )); + )); +#endif Coord3D buildPos = m_baseCenter; buildPos.x += offset.x*c - offset.y*s; buildPos.y += offset.y*c + offset.x*s; diff --git a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 79440b85e7..44ff76181b 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -4028,8 +4028,11 @@ StateReturnType AIFollowWaypointPathState::update() if (getAdjustsDestination() && ai->isDoingGroundMovement()) { if (!TheAI->pathfinder()->adjustDestination(obj, ai->getLocomotorSet(), &m_goalPosition)) { if (m_currentWaypoint) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_LOG(("Breaking out of follow waypoint path %s of %s\n", m_currentWaypoint->getName().str(), m_currentWaypoint->getPathLabel1().str())); +#endif } return STATE_FAILURE; } @@ -4098,8 +4101,11 @@ StateReturnType AIFollowWaypointPathState::update() if (getAdjustsDestination() && ai->isDoingGroundMovement()) { if (!TheAI->pathfinder()->adjustDestination(obj, ai->getLocomotorSet(), &m_goalPosition)) { if (m_currentWaypoint) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_LOG(("Breaking out of follow waypoint path %s of %s\n", m_currentWaypoint->getName().str(), m_currentWaypoint->getPathLabel1().str())); +#endif } return STATE_FAILURE; } diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp index eb9eb21d58..1f0a7bebb3 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp @@ -93,7 +93,10 @@ inline Real calcDistSqr(const Coord3D& a, const Coord3D& b) Int GarrisonContain::findClosestFreeGarrisonPointIndex( Int conditionIndex, const Coord3D *targetPos ) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_ASSERTCRASH(m_garrisonPointsInitialized, ("garrisonPoints are not inited")); +#endif // sanity if( targetPos == NULL || m_garrisonPointsInUse == MAX_GARRISON_POINTS ) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp index 6ac17ecd7c..30ee22c5de 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp @@ -303,7 +303,10 @@ Real PhysicsBehavior::getZFriction() const */ void PhysicsBehavior::applyForce( const Coord3D *force ) { +// TheSuperHackers @info helmutbuhler 06/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_ASSERTCRASH(!(_isnan(force->x) || _isnan(force->y) || _isnan(force->z)), ("PhysicsBehavior::applyForce force NAN!\n")); +#endif if (_isnan(force->x) || _isnan(force->y) || _isnan(force->z)) { return; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp index d0ae47701b..00a0d411a9 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AISkirmishPlayer.cpp @@ -681,12 +681,15 @@ void AISkirmishPlayer::buildAIBaseDefenseStructure(const AsciiString &thingName, Real s = sin(angle); Real c = cos(angle); - DEBUG_LOG(("buildAIBaseDefenseStructure -- Angle is %f sin %f, cos %f \n", 180*angle/PI, s, c)); +// TheSuperHackers @info helmutbuhler 21/04/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC + DEBUG_LOG(("buildAIBaseDefenseStructure -- Angle is %f sin %f, cos %f \n", 180*angle/PI, s, c)); DEBUG_LOG(("buildAIBaseDefenseStructure -- Offset is %f %f, Final Position is %f, %f \n", offset.x, offset.y, offset.x*c - offset.y*s, offset.y*c + offset.x*s - )); + )); +#endif Coord3D buildPos = m_baseCenter; buildPos.x += offset.x*c - offset.y*s; buildPos.y += offset.y*c + offset.x*s; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp index 356890e051..69cf8707ff 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIStates.cpp @@ -4149,8 +4149,11 @@ StateReturnType AIFollowWaypointPathState::update() if (getAdjustsDestination() && ai->isDoingGroundMovement()) { if (!TheAI->pathfinder()->adjustDestination(obj, ai->getLocomotorSet(), &m_goalPosition)) { if (m_currentWaypoint) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_LOG(("Breaking out of follow waypoint path %s of %s\n", m_currentWaypoint->getName().str(), m_currentWaypoint->getPathLabel1().str())); +#endif } return STATE_FAILURE; } @@ -4219,8 +4222,11 @@ StateReturnType AIFollowWaypointPathState::update() if (getAdjustsDestination() && ai->isDoingGroundMovement()) { if (!TheAI->pathfinder()->adjustDestination(obj, ai->getLocomotorSet(), &m_goalPosition)) { if (m_currentWaypoint) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_LOG(("Breaking out of follow waypoint path %s of %s\n", m_currentWaypoint->getName().str(), m_currentWaypoint->getPathLabel1().str())); +#endif } return STATE_FAILURE; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp index a31e291bad..7fe5381a08 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/GarrisonContain.cpp @@ -94,7 +94,10 @@ inline Real calcDistSqr(const Coord3D& a, const Coord3D& b) Int GarrisonContain::findClosestFreeGarrisonPointIndex( Int conditionIndex, const Coord3D *targetPos ) { +// TheSuperHackers @info helmutbuhler 05/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_ASSERTCRASH(m_garrisonPointsInitialized, ("garrisonPoints are not inited")); +#endif // sanity if( targetPos == NULL || m_garrisonPointsInUse == MAX_GARRISON_POINTS ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp index dff994e3d9..dd94155d99 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/PhysicsUpdate.cpp @@ -321,7 +321,10 @@ Real PhysicsBehavior::getZFriction() const */ void PhysicsBehavior::applyForce( const Coord3D *force ) { +// TheSuperHackers @info helmutbuhler 06/05/2025 This debug mutates the code to become CRC incompatible +#if (defined(RTS_DEBUG) || defined(RTS_INTERNAL)) || !RETAIL_COMPATIBLE_CRC DEBUG_ASSERTCRASH(!(_isnan(force->x) || _isnan(force->y) || _isnan(force->z)), ("PhysicsBehavior::applyForce force NAN!\n")); +#endif if (_isnan(force->x) || _isnan(force->y) || _isnan(force->z)) { return; }