File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update
Generals/Code/GameEngine/Source/GameLogic/Object/Update Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 3333#define DEFINE_DEATH_NAMES
3434
3535// INCLUDES ///////////////////////////////////////////////////////////////////////////////////////
36+ #include " Common/FramePacer.h"
3637#include " Common/GameUtility.h"
3738#include " Common/ThingTemplate.h"
3839#include " Common/ThingFactory.h"
@@ -519,8 +520,13 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
519520 {
520521 Real speed = data->m_manualDrivingSpeed ;
521522 DEBUG_ASSERTCRASH (m_lastDrivingClickFrame >= m_2ndLastDrivingClickFrame, (" m_lastDrivingClickFrame should always be >= m_2ndLastDrivingClickFrame" ));
522- // TheSuperHackers @fix Scale delay threshold by frame rate to maintain consistent real-time feel
523- const UnsignedInt scaledDelay = data->m_doubleClickToFastDriveDelay * LOGICFRAMES_PER_SECOND / BaseFps;
523+ // TheSuperHackers @fix Scale delay threshold by frame rate and logic time scale to maintain consistent real-time feel
524+ UnsignedInt scaledDelay = data->m_doubleClickToFastDriveDelay * LOGICFRAMES_PER_SECOND / BaseFps;
525+ if (TheFramePacer != NULL )
526+ {
527+ const Real timeScaleRatio = TheFramePacer->getActualLogicTimeScaleRatio ();
528+ scaledDelay = (UnsignedInt)(scaledDelay * timeScaleRatio);
529+ }
524530 const Bool useFasterSpeed = m_lastDrivingClickFrame - m_2ndLastDrivingClickFrame < scaledDelay;
525531 if ( useFasterSpeed )
526532 {
Original file line number Diff line number Diff line change 3232#define DEFINE_DEATH_NAMES
3333
3434// INCLUDES ///////////////////////////////////////////////////////////////////////////////////////
35+ #include " Common/FramePacer.h"
3536#include " Common/GameUtility.h"
3637#include " Common/ThingTemplate.h"
3738#include " Common/ThingFactory.h"
@@ -569,8 +570,13 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
569570 {
570571 Real speed = data->m_manualDrivingSpeed ;
571572 DEBUG_ASSERTCRASH (m_lastDrivingClickFrame >= m_2ndLastDrivingClickFrame, (" m_lastDrivingClickFrame should always be >= m_2ndLastDrivingClickFrame" ));
572- // TheSuperHackers @fix Scale delay threshold by frame rate to maintain consistent real-time feel
573- const UnsignedInt scaledDelay = data->m_doubleClickToFastDriveDelay * LOGICFRAMES_PER_SECOND / BaseFps;
573+ // TheSuperHackers @fix Scale delay threshold by frame rate and logic time scale to maintain consistent real-time feel
574+ UnsignedInt scaledDelay = data->m_doubleClickToFastDriveDelay * LOGICFRAMES_PER_SECOND / BaseFps;
575+ if (TheFramePacer != NULL )
576+ {
577+ const Real timeScaleRatio = TheFramePacer->getActualLogicTimeScaleRatio ();
578+ scaledDelay = (UnsignedInt)(scaledDelay * timeScaleRatio);
579+ }
574580 const Bool useFasterSpeed = m_scriptedWaypointMode || (m_lastDrivingClickFrame - m_2ndLastDrivingClickFrame < scaledDelay);
575581 if ( useFasterSpeed )
576582 {
You can’t perform that action at this time.
0 commit comments