@@ -661,28 +661,19 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
661661 // get object
662662 const Object *obj = rObj->friend_getObject ();
663663
664- // cache hero objects for drawing in icon layer
665- if ( calcHero && obj->isHero () )
666- {
667- m_cachedHeroObjectList.push_back (obj);
668- }
669- Bool skip = FALSE ;
670-
671664 // check for shrouded status
672665 if (obj->getShroudedStatus (playerIndex) > OBJECTSHROUD_PARTIAL_CLEAR)
673- skip = TRUE ; // object is fogged or shrouded, don't render it.
666+ continue ; // object is fogged or shrouded, don't render it.
674667
675668 //
676669 // objects with a local only unit priority will only appear on the radar if they
677670 // are controlled by the local player, or if the local player is an observer (cause
678671 // they are godlike and can see everything)
679672 //
680-
681-
682673 if ( obj->getRadarPriority () == RADAR_PRIORITY_LOCAL_UNIT_ONLY &&
683- obj->getControllingPlayer () != ThePlayerList-> getLocalPlayer () &&
684- ThePlayerList-> getLocalPlayer () ->isPlayerActive () )
685- skip = TRUE ;
674+ obj->getControllingPlayer () != player &&
675+ player ->isPlayerActive () )
676+ continue ;
686677
687678 // get object position
688679 const Coord3D *pos = obj->getPosition ();
@@ -691,19 +682,15 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
691682 radarPoint.x = pos->x / (m_mapExtent.width () / RADAR_CELL_WIDTH);
692683 radarPoint.y = pos->y / (m_mapExtent.height () / RADAR_CELL_HEIGHT);
693684
694-
695- if ( skip )
696- continue ;
697-
698685 // get the color we're going to draw in
699686 Color c = rObj->getColor ();
700687
701688
702689
703690 // adjust the alpha for stealth units so they "fade/blink" on the radar for the controller
704691 // if( obj->getRadarPriority() == RADAR_PRIORITY_LOCAL_UNIT_ONLY )
705- // ML-- What the heck is this? local-only and neutral-observier -viewed units are stealthy?? Since when?
706- // Now it twinkles for any stealthed object, whether locally controlled or neutral-observier -viewed
692+ // ML-- What the heck is this? local-only and neutral-observer -viewed units are stealthy?? Since when?
693+ // Now it twinkles for any stealthed object, whether locally controlled or neutral-observer -viewed
707694 if ( obj->testStatus ( OBJECT_STATUS_STEALTHED ) )
708695 {
709696 StealthUpdate* stealth = obj->getStealth ();
@@ -712,17 +699,14 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
712699
713700 if ( TheControlBar->getCurrentlyViewedPlayerRelationship (obj->getTeam ()) == ENEMIES )
714701 if ( !obj->testStatus ( OBJECT_STATUS_DETECTED ) && !stealth->isDisguised () )
715- skip = TRUE ;
702+ continue ;
716703
717704 UnsignedByte r, g, b, a;
718705 GameGetColorComponents ( c, &r, &g, &b, &a );
719706
720707 const UnsignedInt framesForTransition = LOGICFRAMES_PER_SECOND;
721708 const UnsignedByte minAlpha = 32 ;
722709
723- if (skip)
724- continue ;
725-
726710 Real alphaScale = INT_TO_REAL (TheGameLogic->getFrame () % framesForTransition) / (framesForTransition / 2 .0f );
727711 if ( alphaScale > 0 .0f )
728712 a = REAL_TO_UNSIGNEDBYTE ( ((alphaScale - 1 .0f ) * (255 .0f - minAlpha)) + minAlpha );
@@ -732,8 +716,11 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *text
732716
733717 }
734718
735-
736-
719+ // cache hero objects for drawing in icon layer
720+ if ( calcHero && obj->isHero () )
721+ {
722+ m_cachedHeroObjectList.push_back (obj);
723+ }
737724
738725 // draw the blip, but make sure the points are legal
739726 if ( legalRadarPoint ( radarPoint.x , radarPoint.y ) )
0 commit comments