make wag and pulse relative to the current actor state
This commit is contained in:
@@ -113,6 +113,9 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
|||||||
switch( m_Effect )
|
switch( m_Effect )
|
||||||
{
|
{
|
||||||
case diffuse_blink:
|
case diffuse_blink:
|
||||||
|
/* XXX: Should diffuse_blink and diffuse_shift multiply the tempState color?
|
||||||
|
* (That would have the same effect with 1,1,1,1, and allow tweening the diffuse
|
||||||
|
* while blinking and shifting.) */
|
||||||
for(i=0; i<4; i++)
|
for(i=0; i<4; i++)
|
||||||
m_tempState.diffuse[i] = bBlinkOn ? m_effectColor1 : m_effectColor2;
|
m_tempState.diffuse[i] = bBlinkOn ? m_effectColor1 : m_effectColor2;
|
||||||
break;
|
break;
|
||||||
@@ -138,7 +141,7 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
|||||||
m_tempState.diffuse[i] = m_tempState.diffuse[0];
|
m_tempState.diffuse[i] = m_tempState.diffuse[0];
|
||||||
break;
|
break;
|
||||||
case wag:
|
case wag:
|
||||||
m_tempState.rotation = m_vEffectMagnitude * sinf( fPercentThroughEffect * 2.0f * PI );
|
m_tempState.rotation += m_vEffectMagnitude * sinf( fPercentThroughEffect * 2.0f * PI );
|
||||||
break;
|
break;
|
||||||
case spin:
|
case spin:
|
||||||
// nothing needs to be here
|
// nothing needs to be here
|
||||||
@@ -172,7 +175,7 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
|||||||
float fMaxZoom = m_vEffectMagnitude[1];
|
float fMaxZoom = m_vEffectMagnitude[1];
|
||||||
float fPercentOffset = sinf( fPercentThroughEffect*PI );
|
float fPercentOffset = sinf( fPercentThroughEffect*PI );
|
||||||
float fZoom = SCALE( fPercentOffset, 0.f, 1.f, fMinZoom, fMaxZoom );
|
float fZoom = SCALE( fPercentOffset, 0.f, 1.f, fMinZoom, fMaxZoom );
|
||||||
m_tempState.scale = RageVector3( fZoom, fZoom, fZoom );
|
m_tempState.scale *= fZoom;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user