fix Press/Lift command. Processed pressed flag in Draw not in Update so that this isn't dependent on the fragile Update order.

This commit is contained in:
Chris Danford
2005-05-23 05:18:05 +00:00
parent 6aa44a76ee
commit 7114ef6227
+3 -7
View File
@@ -63,23 +63,19 @@ void ReceptorArrow::Update( float fDeltaTime )
m_pReceptorGo->SetHidden( !GAMESTATE->m_bPastHereWeGo );
m_pReceptorWaiting->SetHidden( GAMESTATE->m_bPastHereWeGo );
m_pPressBlock->SetHidden( !m_bIsPressed );
}
void ReceptorArrow::DrawPrimitives()
{
if( m_bWasPressed && !m_bIsPressed )
{
m_pReceptorGo->PlayCommand( LIFT_COMMAND_NAME );
m_pReceptorWaiting->PlayCommand( LIFT_COMMAND_NAME );
}
m_bWasPressed = m_bIsPressed;
m_bIsPressed = false; // it may get turned back on next update
}
void ReceptorArrow::DrawPrimitives()
{
ActorFrame::DrawPrimitives();
}