@@ -183,8 +183,8 @@ ParticleUplinkCannonUpdate::ParticleUplinkCannonUpdate( Thing *thing, const Modu
183183 m_nextDamagePulseFrame = 0 ;
184184 m_startAttackFrame = 0 ;
185185 m_startDecayFrame = 0 ;
186- m_lastDrivingClickFrame = 0 ;
187- m_2ndLastDrivingClickFrame = 0 ;
186+ m_lastDrivingClickTimeMsec = 0 ;
187+ m_2ndLastDrivingClickTimeMsec = 0 ;
188188 m_clientShroudedLastFrame = FALSE ;
189189
190190 for ( Int i = 0 ; i < MAX_OUTER_NODES; i++ )
@@ -324,8 +324,8 @@ void ParticleUplinkCannonUpdate::setSpecialPowerOverridableDestination( const Co
324324 {
325325 m_overrideTargetDestination = *loc;
326326 m_manualTargetMode = true ;
327- m_2ndLastDrivingClickFrame = m_lastDrivingClickFrame ;
328- m_lastDrivingClickFrame = TheGameLogic-> getFrame ();
327+ m_2ndLastDrivingClickTimeMsec = m_lastDrivingClickTimeMsec ;
328+ m_lastDrivingClickTimeMsec = timeGetTime ();
329329 }
330330}
331331
@@ -517,7 +517,7 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
517517 else
518518 {
519519 Real speed = data->m_manualDrivingSpeed ;
520- if ( m_lastDrivingClickFrame - m_2ndLastDrivingClickFrame < data->m_doubleClickToFastDriveDelay )
520+ if ( m_lastDrivingClickTimeMsec != 0 && m_2ndLastDrivingClickTimeMsec != 0 && m_lastDrivingClickTimeMsec - m_2ndLastDrivingClickTimeMsec < data->m_doubleClickToFastDriveDelay )
521521 {
522522 // Because we double clicked, use the faster driving speed.
523523 speed = data->m_manualFastDrivingSpeed ;
@@ -1414,11 +1414,11 @@ void ParticleUplinkCannonUpdate::xfer( Xfer *xfer )
14141414 m_startDecayFrame = m_startAttackFrame + data->m_totalFiringFrames ;
14151415 }
14161416
1417- // the time of last manual target click
1418- xfer->xferUnsignedInt ( & m_lastDrivingClickFrame );
1417+ // the time of last manual target click (milliseconds)
1418+ xfer->xferUnsignedInt ( & m_lastDrivingClickTimeMsec );
14191419
1420- // the time of the 2nd last manual target click
1421- xfer->xferUnsignedInt ( &m_2ndLastDrivingClickFrame );
1420+ // the time of the 2nd last manual target click (milliseconds)
1421+ xfer->xferUnsignedInt ( &m_2ndLastDrivingClickTimeMsec );
14221422
14231423 if ( version >= 4 )
14241424 {
0 commit comments