Give actors the ability to undo the rate change triggered by holding

tilde or tab.

This is gated by a new boolean, `tab_tilde_scaling_enabled_`, and
applied only to banners by default.
This commit is contained in:
Brandon W
2025-03-02 10:34:28 -08:00
committed by teejusb
parent 2feb9e784c
commit 9789ef9697
5 changed files with 26 additions and 3 deletions
+12 -2
View File
@@ -13,6 +13,7 @@
#include "LightsManager.h" // for NUM_CabinetLight
#include "ActorUtil.h"
#include "Preference.h"
#include "GameLoop.h"
#include <cmath>
#include <cstddef>
@@ -166,9 +167,10 @@ Actor::Actor()
m_size = RageVector2( 1, 1 );
InitState();
m_pParent = nullptr;
m_FakeParent= nullptr;
m_FakeParent = nullptr;
m_bFirstUpdate = true;
m_tween_uses_effect_delta= false;
m_tween_uses_effect_delta = false;
tab_tilde_scaling_enabled_ = true;
}
Actor::~Actor()
@@ -872,6 +874,14 @@ bool Actor::IsFirstUpdate() const
void Actor::Update( float fDeltaTime )
{
// LOG->Trace( "Actor::Update( %f )", fDeltaTime );
float rate = GameLoop::GetUpdateRate();
if (rate != 1 && !tab_tilde_scaling_enabled_) {
if (rate != 0) {
fDeltaTime *= (1 / rate);
}
}
ASSERT_M( fDeltaTime >= 0, ssprintf("DeltaTime: %f",fDeltaTime) );
if( m_fHibernateSecondsLeft > 0 )