rename variables
This commit is contained in:
@@ -63,7 +63,7 @@ void BGAnimationLayer::Init()
|
|||||||
Unload();
|
Unload();
|
||||||
|
|
||||||
m_fRepeatCommandEverySeconds = -1;
|
m_fRepeatCommandEverySeconds = -1;
|
||||||
m_fSecondsUntilRepeatCommand = 0;
|
m_fSecondsUntilNextCommand = 0;
|
||||||
m_fUpdateRate = 1;
|
m_fUpdateRate = 1;
|
||||||
m_fFOV = -1; // no change
|
m_fFOV = -1; // no change
|
||||||
m_bLighting = false;
|
m_bLighting = false;
|
||||||
@@ -535,7 +535,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
|||||||
CLAMP( m_Type, (Type)0, TYPE_INVALID );
|
CLAMP( m_Type, (Type)0, TYPE_INVALID );
|
||||||
ini.GetValue( sLayer, "Command", m_sOnCommand );
|
ini.GetValue( sLayer, "Command", m_sOnCommand );
|
||||||
ini.GetValue( sLayer, "CommandRepeatSeconds", m_fRepeatCommandEverySeconds );
|
ini.GetValue( sLayer, "CommandRepeatSeconds", m_fRepeatCommandEverySeconds );
|
||||||
m_fSecondsUntilRepeatCommand = m_fRepeatCommandEverySeconds;
|
m_fSecondsUntilNextCommand = m_fRepeatCommandEverySeconds;
|
||||||
ini.GetValue( sLayer, "OffCommand", m_sOffCommand );
|
ini.GetValue( sLayer, "OffCommand", m_sOffCommand );
|
||||||
ini.GetValue( sLayer, "FOV", m_fFOV );
|
ini.GetValue( sLayer, "FOV", m_fFOV );
|
||||||
ini.GetValue( sLayer, "Lighting", m_bLighting );
|
ini.GetValue( sLayer, "Lighting", m_bLighting );
|
||||||
@@ -930,12 +930,14 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
|||||||
|
|
||||||
if( m_fRepeatCommandEverySeconds != -1 ) // if repeating
|
if( m_fRepeatCommandEverySeconds != -1 ) // if repeating
|
||||||
{
|
{
|
||||||
m_fSecondsUntilRepeatCommand -= fDeltaTime;
|
m_fSecondsUntilNextCommand -= fDeltaTime;
|
||||||
if( m_fSecondsUntilRepeatCommand <= 0 )
|
if( m_fSecondsUntilNextCommand <= 0 )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pActors.size(); i++ )
|
for( unsigned i=0; i<m_pActors.size(); i++ )
|
||||||
|
{
|
||||||
m_pActors[i]->Command( m_sOnCommand );
|
m_pActors[i]->Command( m_sOnCommand );
|
||||||
m_fSecondsUntilRepeatCommand += m_fRepeatCommandEverySeconds;
|
}
|
||||||
|
m_fSecondsUntilNextCommand += m_fRepeatCommandEverySeconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ protected:
|
|||||||
CString m_sOnCommand;
|
CString m_sOnCommand;
|
||||||
CString m_sOffCommand;
|
CString m_sOffCommand;
|
||||||
float m_fRepeatCommandEverySeconds; // -1 = no repeat
|
float m_fRepeatCommandEverySeconds; // -1 = no repeat
|
||||||
float m_fSecondsUntilRepeatCommand;
|
float m_fSecondsUntilNextCommand;
|
||||||
float m_fUpdateRate; // set by GainingFocus
|
float m_fUpdateRate; // set by GainingFocus
|
||||||
float m_fFOV; // -1 = no change
|
float m_fFOV; // -1 = no change
|
||||||
bool m_bLighting;
|
bool m_bLighting;
|
||||||
|
|||||||
Reference in New Issue
Block a user