From 430b543e17e11ffba8fa27ab19a88f6041c8ac7c Mon Sep 17 00:00:00 2001 From: Caball009 <82909616+Caball009@users.noreply.github.com> Date: Thu, 17 Jul 2025 12:42:21 +0200 Subject: [PATCH] Synchronized aircraft takeoff. --- .../Object/Update/AIUpdate/JetAIUpdate.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp index bf339c58e6..0a98fbd989 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/JetAIUpdate.cpp @@ -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. @@ -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;