@@ -650,7 +650,9 @@ void BuildAssistant::iterateFootprint( const ThingTemplate *build,
650650
651651
652652// -------------------------------------------------------------------------------------------------
653- /* * Check for objects preventing building at this location. */
653+ /* * Check for objects preventing building at this location.
654+ * TheSuperHackers @tweak Stubbjax 05/09/2025 Return LBC_SHROUD for shrouded objects near the
655+ * edge of the shroud so that players cannot use this info to determine whether they exist. */
654656// -------------------------------------------------------------------------------------------------
655657LegalBuildCode BuildAssistant::isLocationClearOfObjects ( const Coord3D *worldPos,
656658 const ThingTemplate *build,
@@ -668,8 +670,10 @@ LegalBuildCode BuildAssistant::isLocationClearOfObjects( const Coord3D *worldPos
668670 MemoryPoolObjectHolder hold (iter);
669671 for ( them = iter->first (); them; them = iter->next () )
670672 {
671- Bool feedbackWithFailure = TRUE ;
673+ if (them->getDrawable () && them->getDrawable ()->getFullyObscuredByShroud ())
674+ return LBC_SHROUD;
672675
676+ Bool feedbackWithFailure = TRUE ;
673677 Relationship rel = builderObject ? builderObject->getRelationship ( them ) : NEUTRAL;
674678
675679 // Kris: If the object is stealthed and we can't see it, pretend we can build there.
@@ -865,21 +869,31 @@ LegalBuildCode BuildAssistant::isLocationClearOfObjects( const Coord3D *worldPos
865869
866870 // an immobile object will obstruct our building no matter what team it's on
867871 if ( them->isKindOf ( KINDOF_IMMOBILE ) ) {
872+ Bool shrouded = them->getDrawable () && them->getDrawable ()->getFullyObscuredByShroud ();
868873 /* Check for overlap of my exit rectangle to his geom info. */
869874 if (checkMyExit && ThePartitionManager->geomCollidesWithGeom (them->getPosition (), hisBounds, them->getOrientation (),
870875 &myExitPos, myGeom, angle)) {
876+ if (shrouded)
877+ return LBC_SHROUD;
878+
871879 TheTerrainVisual->addFactionBib (them, true );
872880 return LBC_OBJECTS_IN_THE_WAY;
873881 }
874882 // Check for overlap of his exit rectangle with my geom info
875883 if (checkHisExit && ThePartitionManager->geomCollidesWithGeom (&hisExitPos, hisGeom, them->getOrientation (),
876884 worldPos, myBounds, angle)) {
885+ if (shrouded)
886+ return LBC_SHROUD;
887+
877888 TheTerrainVisual->addFactionBib (them, true );
878889 return LBC_OBJECTS_IN_THE_WAY;
879890 }
880891 // Check both exit rectangles together.
881892 if (checkMyExit&&checkHisExit&&ThePartitionManager->geomCollidesWithGeom (&hisExitPos, hisGeom, them->getOrientation (),
882893 &myExitPos, myGeom, angle)) {
894+ if (shrouded)
895+ return LBC_SHROUD;
896+
883897 TheTerrainVisual->addFactionBib (them, true );
884898 return LBC_OBJECTS_IN_THE_WAY;
885899 }
0 commit comments