File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar
Generals/Code/GameEngine/Source/GameClient/GUI/ControlBar Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -1439,17 +1439,11 @@ void ControlBar::update( void )
14391439 Object* obj = drawToEvaluateFor ? drawToEvaluateFor->getObject () : NULL ;
14401440 setPortraitByObject (obj);
14411441
1442- if (obj && obj->getControllingPlayer () == getCurrentlyViewedPlayer ())
1443- {
1444- ExitInterface* exit = obj->getObjectExitInterface ();
1445- if (exit)
1446- showRallyPoint (exit->getRallyPoint ());
1447- else
1448- showRallyPoint (NULL );
1449- }
1450- else
1451- showRallyPoint (NULL );
1442+ const Coord3D* exitPosition = NULL ;
1443+ if (obj && obj->getControllingPlayer () == getCurrentlyViewedPlayer () && obj->getObjectExitInterface ())
1444+ exitPosition = obj->getObjectExitInterface ()->getRallyPoint ();
14521445
1446+ showRallyPoint (exitPosition);
14531447 return ;
14541448 }
14551449
Original file line number Diff line number Diff line change @@ -1462,17 +1462,11 @@ void ControlBar::update( void )
14621462 Object* obj = drawToEvaluateFor ? drawToEvaluateFor->getObject () : NULL ;
14631463 setPortraitByObject (obj);
14641464
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 );
1465+ const Coord3D* exitPosition = NULL ;
1466+ if (obj && obj->getControllingPlayer () == getCurrentlyViewedPlayer () && obj->getObjectExitInterface ())
1467+ exitPosition = obj->getObjectExitInterface ()->getRallyPoint ();
14751468
1469+ showRallyPoint (exitPosition);
14761470 return ;
14771471 }
14781472
You can’t perform that action at this time.
0 commit comments