Skip to content

Commit 7bc0326

Browse files
committed
Simplified code.
1 parent 33fef87 commit 7bc0326

File tree

1 file changed

+7
-14
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate

1 file changed

+7
-14
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,21 +1349,16 @@ class JetPauseBeforeTakeoffState : public AIFaceState
13491349

13501350
// always call this.
13511351
StateReturnType superStatus = AIFaceState::update();
1352-
UnsignedInt now = TheGameLogic->getFrame();
1353-
1354-
#if !RETAIL_COMPATIBLE_CRC
1355-
if (m_resetTimer && now >= m_whenTransfer)
1356-
{
1357-
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
1358-
ParkingPlaceBehaviorInterface* pp = getPP(jet->getProducerID());
1359-
if (pp)
1360-
pp->transferRunwayReservationToNextInLineForTakeoff(jet->getID());
1361-
}
1362-
#endif
13631352

1353+
#if RETAIL_COMPATIBLE_CRC
13641354
if (findWaiter())
13651355
return STATE_CONTINUE;
1356+
#else
1357+
if (!m_resetTimer && findWaiter())
1358+
return STATE_CONTINUE;
1359+
#endif
13661360

1361+
UnsignedInt now = TheGameLogic->getFrame();
13671362
if (!m_resetTimer)
13681363
{
13691364
// we had to wait, but now everyone else is ready, so restart our countdown.
@@ -1389,14 +1384,12 @@ class JetPauseBeforeTakeoffState : public AIFaceState
13891384
DEBUG_ASSERTCRASH(m_when != 0, ("hmm"));
13901385
DEBUG_ASSERTCRASH(m_whenTransfer != 0, ("hmm"));
13911386

1392-
#if RETAIL_COMPATIBLE_CRC
1393-
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
1387+
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
13941388
ParkingPlaceBehaviorInterface* pp = getPP(jet->getProducerID());
13951389
if (pp && now >= m_whenTransfer)
13961390
{
13971391
pp->transferRunwayReservationToNextInLineForTakeoff(jet->getID());
13981392
}
1399-
#endif
14001393

14011394
if (now >= m_when)
14021395
return superStatus;

0 commit comments

Comments
 (0)