Skip to content

Conversation

@bobtista
Copy link

Closes #2011

Testing (TODO)

Fast drive mode activation via double-click now works consistently at any frame rate and logic time scale setting.

@bobtista bobtista force-pushed the bobtista/fix-particle-uplink-double-click-timing branch 3 times, most recently from bedd3a9 to 4718d05 Compare December 19, 2025 21:41
@bobtista bobtista marked this pull request as ready for review December 19, 2025 22:24
@stephanmeesters
Copy link

I could do a bit of testing and review for this

For both 30hz and 60hz :

  • double click to activate fast beam should feel the same
  • after activating fast beam the trajectory should be the same
  • make a save game right after activating the fast beam then check if the trajectory is the same (for tsh regular and retail compatible versions)
  • load a retail savegame and check that the beam trajectory is the same as in the retail version

Does that seem right?

Real speed = data->m_manualDrivingSpeed;
if( m_scriptedWaypointMode || m_lastDrivingClickFrame - m_2ndLastDrivingClickFrame < data->m_doubleClickToFastDriveDelay )
#if !RETAIL_COMPATIBLE_CRC
if( m_scriptedWaypointMode || (m_lastDrivingClickTimeMsec != 0 && m_2ndLastDrivingClickTimeMsec != 0 && m_lastDrivingClickTimeMsec - m_2ndLastDrivingClickTimeMsec < data->m_doubleClickToFastDriveDelay) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m_lastDrivingClickTimeMsec != 0 && m_2ndLastDrivingClickTimeMsec != 0
Do we need to check this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If either of them are 0 we could get weird results right? Eg huge timestamp - 0 = big number, and if both are, 0 - 0 = 0.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't that also apply to the original code with frame numbers?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, yes, added the null checks to the RETAIL_COMPATIBLE_CRC code too

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand why it's needed, though. Is there a bug without this in the original code, or does the change to msec make it necessary to have these != 0 checks?

@bobtista bobtista force-pushed the bobtista/fix-particle-uplink-double-click-timing branch from 4718d05 to fdb318e Compare December 20, 2025 20:26
@Caball009 Caball009 added Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility Input Minor Severity: Minor < Major < Critical < Blocker Bug Something is not working right, typically is user facing labels Dec 21, 2025
@bobtista bobtista force-pushed the bobtista/fix-particle-uplink-double-click-timing branch from fdb318e to d3e0024 Compare December 21, 2025 19:53
@bobtista
Copy link
Author

Replicated to Generals in the most recent commit, which differs slightly and is worth giving a quick look

@bobtista bobtista force-pushed the bobtista/fix-particle-uplink-double-click-timing branch from f33000d to 8e53756 Compare December 22, 2025 00:02
@bobtista bobtista force-pushed the bobtista/fix-particle-uplink-double-click-timing branch from 8e53756 to c01dbb2 Compare December 22, 2025 03:58
@stephanmeesters
Copy link

Tested this by making a savegame of a skirmish at max gamespeed, then loaded it back at regular gamespeed. Trajectory of the beam and beam duration appeared the same also using fast drive

Using the compatibility flags I loaded a retail gamesave, and also saved a game and loaded that in retail. That works fine


I thought it would be interesting to test 30hz and 60hz with the same gamespeed the way GO does it, stephanmeesters@7491c32

Double click felt the same, trajectory and duration the same

It did have problems with the replay as the beam duration was no longer the same, but the gametime was also reported wrong, so that's probably just because I hacked that GO code in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Input Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParticleUplinkCannon double-click fast drive timing changes with framerate

3 participants