Skip to content

Commit 430b543

Browse files
committed
Synchronized aircraft takeoff.
1 parent 16c50f7 commit 430b543

File tree

1 file changed

+15
-3
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate

1 file changed

+15
-3
lines changed

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,11 +1349,21 @@ class JetPauseBeforeTakeoffState : public AIFaceState
13491349

13501350
// always call this.
13511351
StateReturnType superStatus = AIFaceState::update();
1352-
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
1363+
13531364
if (findWaiter())
13541365
return STATE_CONTINUE;
13551366

1356-
UnsignedInt now = TheGameLogic->getFrame();
13571367
if (!m_resetTimer)
13581368
{
13591369
// we had to wait, but now everyone else is ready, so restart our countdown.
@@ -1379,12 +1389,14 @@ class JetPauseBeforeTakeoffState : public AIFaceState
13791389
DEBUG_ASSERTCRASH(m_when != 0, ("hmm"));
13801390
DEBUG_ASSERTCRASH(m_whenTransfer != 0, ("hmm"));
13811391

1382-
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
1392+
#if RETAIL_COMPATIBLE_CRC
1393+
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
13831394
ParkingPlaceBehaviorInterface* pp = getPP(jet->getProducerID());
13841395
if (pp && now >= m_whenTransfer)
13851396
{
13861397
pp->transferRunwayReservationToNextInLineForTakeoff(jet->getID());
13871398
}
1399+
#endif
13881400

13891401
if (now >= m_when)
13901402
return superStatus;

0 commit comments

Comments
 (0)