Skip to content

[GEN][ZH] Improve synchronization of pairs of aircraft taking off #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1349,11 +1349,21 @@ class JetPauseBeforeTakeoffState : public AIFaceState

// always call this.
StateReturnType superStatus = AIFaceState::update();

UnsignedInt now = TheGameLogic->getFrame();

#if !RETAIL_COMPATIBLE_CRC
if (m_resetTimer && now >= m_whenTransfer)
{
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
ParkingPlaceBehaviorInterface* pp = getPP(jet->getProducerID());
if (pp)
pp->transferRunwayReservationToNextInLineForTakeoff(jet->getID());
}
#endif

if (findWaiter())
return STATE_CONTINUE;

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

// once we start the final wait, release the runways for guys behind us, so they can start taxiing
#if RETAIL_COMPATIBLE_CRC
// once we start the final wait, release the runways for guys behind us, so they can start taxiing
ParkingPlaceBehaviorInterface* pp = getPP(jet->getProducerID());
if (pp && now >= m_whenTransfer)
{
pp->transferRunwayReservationToNextInLineForTakeoff(jet->getID());
}
#endif

if (now >= m_when)
return superStatus;
Expand Down
Loading