@@ -676,6 +676,9 @@ LegalBuildCode BuildAssistant::isLocationClearOfObjects( const Coord3D *worldPos
676676 {
677677 Bool feedbackWithFailure = TRUE ;
678678
679+ if (them->getDrawable () && them->getDrawable ()->getFullyObscuredByShroud ())
680+ return LBC_SHROUD;
681+
679682 Relationship rel = builderObject ? builderObject->getRelationship ( them ) : NEUTRAL;
680683
681684 // Kris: If the object is stealthed and we can't see it, pretend we can build there.
@@ -871,22 +874,26 @@ LegalBuildCode BuildAssistant::isLocationClearOfObjects( const Coord3D *worldPos
871874
872875 // an immobile object will obstruct our building no matter what team it's on
873876 if ( them->isKindOf ( KINDOF_IMMOBILE ) ) {
877+ Bool shrouded = them->getDrawable () && them->getDrawable ()->getFullyObscuredByShroud ();
874878 /* Check for overlap of my exit rectangle to his geom info. */
875879 if (checkMyExit && ThePartitionManager->geomCollidesWithGeom (them->getPosition (), hisBounds, them->getOrientation (),
876880 &myExitPos, myGeom, angle)) {
877- TheTerrainVisual->addFactionBib (them, true );
881+ if (!shrouded)
882+ TheTerrainVisual->addFactionBib (them, true );
878883 return LBC_OBJECTS_IN_THE_WAY;
879884 }
880885 // Check for overlap of his exit rectangle with my geom info
881886 if (checkHisExit && ThePartitionManager->geomCollidesWithGeom (&hisExitPos, hisGeom, them->getOrientation (),
882887 worldPos, myBounds, angle)) {
883- TheTerrainVisual->addFactionBib (them, true );
888+ if (!shrouded)
889+ TheTerrainVisual->addFactionBib (them, true );
884890 return LBC_OBJECTS_IN_THE_WAY;
885891 }
886892 // Check both exit rectangles together.
887893 if (checkMyExit&&checkHisExit&&ThePartitionManager->geomCollidesWithGeom (&hisExitPos, hisGeom, them->getOrientation (),
888894 &myExitPos, myGeom, angle)) {
889- TheTerrainVisual->addFactionBib (them, true );
895+ if (!shrouded)
896+ TheTerrainVisual->addFactionBib (them, true );
890897 return LBC_OBJECTS_IN_THE_WAY;
891898 }
892899 }
0 commit comments