void CMover::WingMotionSetting( const CModelObject* pModel )
{
#ifndef __PMA_WING
if( m_pRide == NULL || m_pRide->m_pBone == NULL )
return;
#else
if( pModel == NULL || pModel->m_pBone == NULL )
return;
#endif
if( m_pRide == NULL && m_pRide->m_pBone == NULL )
return;
if( ( m_pActMover->GetState() & OBJSTA_STAND ) && ( D3DXVec3LengthSq( &m_pActMover->m_vDelta ) <= 0.000f ) && pModel->m_fFrameCurrent == 0.0f )
{
if( m_eWingStateFlag != FLOATING )
{
CString strMotion = m_pRide->GetMotionFileName( _T("stand") );
assert( strMotion != _T("") );
m_pRide->LoadMotion( strMotion );
m_pRide->SetMotionBlending( TRUE );
m_pRide->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLOATING;
}
}
else if( m_pActMover->GetStateFlag() & OBJSTAF_ACC )
{
if( m_eWingStateFlag != FLYING )
{
CString strMotion = m_pRide->GetMotionFileName( _T("walk") );
assert( strMotion != _T("") );
m_pRide->LoadMotion( strMotion );
m_pRide->SetMotionBlending( TRUE );
m_pRide->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLYING;
}
}
else if( ( m_pActMover->GetState() & OBJSTA_LTURN ) || ( m_pActMover->GetState() & OBJSTA_RTURN ) )
{
if( m_eWingStateFlag != TURNING )
m_eWingStateFlag = TURNING;
}
}
#ifdef __PMA_WING
if ( +m_pMask != m_pRide && m_pMask != NULL )
{
if( ( m_pActMover->GetState() & OBJSTA_STAND && !m_pActMover->IsSit() && !m_pActMover->IsWalk()) && ( D3DXVec3LengthSq( &m_pActMover->m_vDelta ) <= 0.000f ) && pModel->m_fFrameCurrent == 0.0f )
{
if( m_eWingStateFlag != FLOATING )
{
CString strMotion = m_pMask->GetMotionFileName( _T("stand") );
assert( strMotion != _T("") );
m_pMask->LoadMotion( strMotion );
m_pMask->SetMotionBlending( TRUE );
m_pMask->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLOATING;
}
}
else if( m_pActMover->GetState() & OBJSTA_NOT_STAND || m_pActMover->IsWalk() )
{
if( m_eWingStateFlag != FLYING )
{
CString strMotion = m_pMask->GetMotionFileName( _T("walk") );
assert( strMotion != _T("") );
m_pMask->LoadMotion( strMotion );
m_pMask->SetMotionBlending( TRUE );
m_pMask->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLYING;
}
}
else if( ( m_pActMover->GetState() & OBJSTA_LTURN ) || ( m_pActMover->GetState() & OBJSTA_RTURN ) && !m_pActMover->IsWalk() && !m_pActMover->IsSit())
{
if( m_eWingStateFlag != TURNING )
m_eWingStateFlag = TURNING;
}
}
#endif
}
float CMover::GetRideFrameSpeed( void )
{
#ifndef __PMA_WING
if( m_pRide == NULL || m_pRide->m_pBone == NULL )
return;
#else
if( pModel == NULL || pModel->m_pBone == NULL )
return;
#endif
if( m_pRide == NULL && m_pRide->m_pBone == NULL )
return;
if( ( m_pActMover->GetState() & OBJSTA_STAND ) && ( D3DXVec3LengthSq( &m_pActMover->m_vDelta ) <= 0.000f ) && pModel->m_fFrameCurrent == 0.0f )
{
if( m_eWingStateFlag != FLOATING )
{
CString strMotion = m_pRide->GetMotionFileName( _T("stand") );
assert( strMotion != _T("") );
m_pRide->LoadMotion( strMotion );
m_pRide->SetMotionBlending( TRUE );
m_pRide->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLOATING;
}
}
else if( m_pActMover->GetStateFlag() & OBJSTAF_ACC )
{
if( m_eWingStateFlag != FLYING )
{
CString strMotion = m_pRide->GetMotionFileName( _T("walk") );
assert( strMotion != _T("") );
m_pRide->LoadMotion( strMotion );
m_pRide->SetMotionBlending( TRUE );
m_pRide->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLYING;
}
}
else if( ( m_pActMover->GetState() & OBJSTA_LTURN ) || ( m_pActMover->GetState() & OBJSTA_RTURN ) )
{
if( m_eWingStateFlag != TURNING )
m_eWingStateFlag = TURNING;
}
}
#ifdef __PMA_WING
if ( +m_pMask != m_pRide && m_pMask != NULL )
{
if( ( m_pActMover->GetState() & OBJSTA_STAND && !m_pActMover->IsSit() && !m_pActMover->IsWalk()) && ( D3DXVec3LengthSq( &m_pActMover->m_vDelta ) <= 0.000f ) && pModel->m_fFrameCurrent == 0.0f )
{
if( m_eWingStateFlag != FLOATING )
{
CString strMotion = m_pMask->GetMotionFileName( _T("stand") );
assert( strMotion != _T("") );
m_pMask->LoadMotion( strMotion );
m_pMask->SetMotionBlending( TRUE );
m_pMask->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLOATING;
}
}
else if( m_pActMover->GetState() & OBJSTA_NOT_STAND || m_pActMover->IsWalk() )
{
if( m_eWingStateFlag != FLYING )
{
CString strMotion = m_pMask->GetMotionFileName( _T("walk") );
assert( strMotion != _T("") );
m_pMask->LoadMotion( strMotion );
m_pMask->SetMotionBlending( TRUE );
m_pMask->SetLoop( ANILOOP_LOOP );
m_eWingStateFlag = FLYING;
}
}
else if( ( m_pActMover->GetState() & OBJSTA_LTURN ) || ( m_pActMover->GetState() & OBJSTA_RTURN ) && !m_pActMover->IsWalk() && !m_pActMover->IsSit())
{
if( m_eWingStateFlag != TURNING )
m_eWingStateFlag = TURNING;
}
}
#endif
}
float CMover::GetRideFrameSpeed( void )
im getting these errors :<
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14226) : error C2059: syntax error : 'if'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14227) : error C2143: syntax error : missing ';' before '{'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14227) : error C2447: '{' : missing function header (old-style formal list?)
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2059: syntax error : '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2143: syntax error : missing ';' before '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2059: syntax error : '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14261) : error C2143: syntax error : missing ';' before '{'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14261) : error C2447: '{' : missing function header (old-style formal list?)
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14227) : error C2143: syntax error : missing ';' before '{'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14227) : error C2447: '{' : missing function header (old-style formal list?)
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2059: syntax error : '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2143: syntax error : missing ';' before '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14259) : error C2059: syntax error : '}'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14261) : error C2143: syntax error : missing ';' before '{'
\Users\JAR\Desktop\SRC\_Common\Mover.cpp(14261) : error C2447: '{' : missing function header (old-style formal list?)
thanks in advance!







