@@ -659,28 +659,19 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
659659 // get object
660660 const Object *obj = rObj->friend_getObject ();
661661
662- // cache hero objects for drawing in icon layer
663- if ( calcHero && obj->isHero () )
664- {
665- m_cachedHeroObjectList.push_back (obj);
666- }
667- Bool skip = FALSE ;
668-
669662 // check for shrouded status
670663 if (obj->getShroudedStatus (playerIndex) > OBJECTSHROUD_PARTIAL_CLEAR)
671- skip = TRUE ; // object is fogged or shrouded, don't render it.
664+ continue ; // object is fogged or shrouded, don't render it.
672665
673666 //
674667 // objects with a local only unit priority will only appear on the radar if they
675668 // are controlled by the local player, or if the local player is an observer (cause
676669 // they are godlike and can see everything)
677670 //
678-
679-
680671 if ( obj->getRadarPriority () == RADAR_PRIORITY_LOCAL_UNIT_ONLY &&
681- obj->getControllingPlayer () != ThePlayerList-> getLocalPlayer () &&
682- ThePlayerList-> getLocalPlayer () ->isPlayerActive () )
683- skip = TRUE ;
672+ obj->getControllingPlayer () != player &&
673+ player ->isPlayerActive () )
674+ continue ;
684675
685676 // get object position
686677 const Coord3D *pos = obj->getPosition ();
@@ -689,34 +680,27 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
689680 radarPoint.x = pos->x / (m_mapExtent.width () / RADAR_CELL_WIDTH);
690681 radarPoint.y = pos->y / (m_mapExtent.height () / RADAR_CELL_HEIGHT);
691682
692-
693- if ( skip )
694- continue ;
695-
696683 // get the color we're going to draw in
697684 Color c = rObj->getColor ();
698685
699686
700687
701688 // adjust the alpha for stealth units so they "fade/blink" on the radar for the controller
702689 // if( obj->getRadarPriority() == RADAR_PRIORITY_LOCAL_UNIT_ONLY )
703- // ML-- What the heck is this? local-only and neutral-observier -viewed units are stealthy?? Since when?
704- // Now it twinkles for any stealthed object, whether locally controlled or neutral-observier -viewed
690+ // ML-- What the heck is this? local-only and neutral-observer -viewed units are stealthy?? Since when?
691+ // Now it twinkles for any stealthed object, whether locally controlled or neutral-observer -viewed
705692 if ( obj->testStatus ( OBJECT_STATUS_STEALTHED ) )
706693 {
707694 if ( TheControlBar->getCurrentlyViewedPlayerRelationship (obj->getTeam ()) == ENEMIES )
708695 if ( !obj->testStatus ( OBJECT_STATUS_DETECTED ) && !obj->testStatus ( OBJECT_STATUS_DISGUISED ) )
709- skip = TRUE ;
696+ continue ;
710697
711698 UnsignedByte r, g, b, a;
712699 GameGetColorComponents ( c, &r, &g, &b, &a );
713700
714701 const UnsignedInt framesForTransition = LOGICFRAMES_PER_SECOND;
715702 const UnsignedByte minAlpha = 32 ;
716703
717- if (skip)
718- continue ;
719-
720704 Real alphaScale = INT_TO_REAL (TheGameLogic->getFrame () % framesForTransition) / (framesForTransition / 2 .0f );
721705 if ( alphaScale > 0 .0f )
722706 a = REAL_TO_UNSIGNEDBYTE ( ((alphaScale - 1 .0f ) * (255 .0f - minAlpha)) + minAlpha );
@@ -726,8 +710,11 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
726710
727711 }
728712
729-
730-
713+ // cache hero objects for drawing in icon layer
714+ if ( calcHero && obj->isHero () )
715+ {
716+ m_cachedHeroObjectList.push_back (obj);
717+ }
731718
732719 // draw the blip, but make sure the points are legal
733720 if ( legalRadarPoint ( radarPoint.x , radarPoint.y ) )
0 commit comments