Skip to content

Commit f320f47

Browse files
committed
feat: Show rally point marker for the viewed player while observing
1 parent 63f2229 commit f320f47

File tree

1 file changed

+15
-1
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar

1 file changed

+15
-1
lines changed

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,18 @@ void ControlBar::update( void )
14611461

14621462
Object* obj = drawToEvaluateFor ? drawToEvaluateFor->getObject() : NULL;
14631463
setPortraitByObject(obj);
1464+
1465+
if (obj && obj->getControllingPlayer() == getCurrentlyViewedPlayer())
1466+
{
1467+
ExitInterface* exit = obj->getObjectExitInterface();
1468+
if (exit)
1469+
showRallyPoint(exit->getRallyPoint());
1470+
else
1471+
showRallyPoint(NULL);
1472+
}
1473+
else
1474+
showRallyPoint(NULL);
1475+
14641476
return;
14651477
}
14661478

@@ -2739,7 +2751,9 @@ void ControlBar::showRallyPoint( const Coord3D *loc )
27392751
marker->setOrientation( TheGlobalData->m_downwindAngle );//To blow down wind -- ML
27402752

27412753
// set the marker colors to that of the local player
2742-
Player *player = ThePlayerList->getLocalPlayer();
2754+
Player* player = TheControlBar->getCurrentlyViewedPlayer();
2755+
if (!player)
2756+
return;
27432757

27442758
if (TheGlobalData->m_timeOfDay == TIME_OF_DAY_NIGHT)
27452759
marker->setIndicatorColor( player->getPlayerNightColor() );

0 commit comments

Comments
 (0)