diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp index 3e6d515983..599e05eb8b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ObjectCreationList.cpp @@ -1394,8 +1394,25 @@ class GenericObjectCreationNugget : public ObjectCreationNugget FindPositionOptions fpOptions; fpOptions.minRadius = GameLogicRandomValueReal(m_minDistanceAFormation, m_minDistanceBFormation); fpOptions.maxRadius = m_maxDistanceFormation; +#if !RETAIL_COMPATIBLE_CRC + // TheSuperHackers @bugfix bobtista 18/11/2025 Use FPF_CLEAR_CELLS_ONLY when DiesOnBadLand to prevent spawning in water/cliffs + if (m_diesOnBadLand) + { + fpOptions.flags = static_cast(FPF_USE_HIGHEST_LAYER | FPF_CLEAR_CELLS_ONLY); + } + else + { + fpOptions.flags = FPF_USE_HIGHEST_LAYER; + } + // TheSuperHackers @bugfix bobtista 18/11/2025 Fall back to center if no passable position found in spread formation + if (!ThePartitionManager->findPositionAround(pos, &fpOptions, &resultPos)) + { + resultPos = *pos; + } +#else fpOptions.flags = FPF_USE_HIGHEST_LAYER; ThePartitionManager->findPositionAround(pos, &fpOptions, &resultPos); +#endif doStuffToObj( debris, m_names[pick], &resultPos, mtx, orientation, sourceObj, lifetimeFrames ); } else