Skip to content

tweak(behavior): 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

Conversation

Caball009
Copy link

@Caball009 Caball009 commented Jul 17, 2025

The enhancement in this PR works better if the takeoff order is deterministic.

Sometimes when ordering 4 aircraft to take off, one of the aircraft takes off earlier than the other. This happens because aircraft will wait for the next aircraft in line to finish taxiing instead of taking off at the scheduled frame.

TODO

  • Replicate in Generals
  • Add code comments

@Caball009 Caball009 added China Affects China faction Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker USA Affects USA faction Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Jul 17, 2025
@Caball009 Caball009 changed the title [GEN][ZH] Improve synchronization of sets of aircraft taking off [GEN][ZH] Improve synchronization of pairs of aircraft taking off Jul 21, 2025
@Caball009 Caball009 force-pushed the fix_airfield_takeoff_frames branch from 6059dcd to b43d336 Compare August 15, 2025 13:21
@Caball009
Copy link
Author

This should show the issue:

if (findWaiter()) 
{
	UnsignedInt now = TheGameLogic->getFrame();
	DEBUG_ASSERTCRASH(m_when == 0 || now < m_when, ("Aircraft is still waiting despite being scheduled to take off"));
	return STATE_CONTINUE; 
}

@Caball009 Caball009 requested a review from xezon August 15, 2025 17:11
@Caball009 Caball009 changed the title [GEN][ZH] Improve synchronization of pairs of aircraft taking off tweak(behavior): Improve synchronization of pairs of aircraft taking off Aug 15, 2025
@xezon
Copy link

xezon commented Aug 15, 2025

Can you attach a video of the issue?

@Caball009
Copy link
Author

Caball009 commented Aug 15, 2025

Can you attach a video of the issue?

cnc.gen.zero.hour.airfield.takeoff.synchronization.mp4

Notice how the pairs of aircraft go out of sync for the two bottom left airfields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
China Affects China faction Enhancement Is new feature or request Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility USA Affects USA faction ZH Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants