Model\etc_Tail1 and etc_Tail2
ActionMoverState2.cpp
Code:
void CActionMover::ProcessFlyParticle( float fLenSq )
{
CMover *pMover = m_pMover;
// 운영자 투명모드때는 파티클 안나옴.
if( (pMover->IsMode( TRANSPARENT_MODE ) ) == 0 )
{
ItemProp* pRideProp = prj.GetItemProp( m_pMover->m_dwRideItemIdx ); // 현재 타고있는 탈것의 프로퍼티.
// 비행 파티클 처리.
if( fLenSq > 0.01f )
{
if( (pMover->IsActiveMover() && g_Neuz.m_camera.m_fZoom > 2.0f) || pMover->IsActiveMover() == FALSE ) // 일정속도 이상이 되면 꼬리에 파티클이 나오기 시작.
{
int nType = 0;
if( pRideProp && pRideProp->dwID == II_RID_RID_BOR_RIDINGCLOUD )
nType = 1;
CreateFlyParticle( pMover, pMover->GetAngleX(), nType );
}
}
if( fLenSq > 0.001f )
{
if( (pMover->IsActiveMover() && g_Neuz.m_camera.m_fZoom > 1.0f) || pMover->IsActiveMover() == FALSE )
{
if( pRideProp && pRideProp->dwItemKind3 == IK3_BOARD ) // 보드만 꼬리가 나온다.
{
if( m_pTail )
{
if( pRideProp->dwID == II_RID_RID_BOR_RIDINGCLOUD ) // 근두운일때
{
if( m_pTail->GetType() != 2 ) // 생성되었던 꼬리고 근두운용이 아니면
m_pTail->ChangeTexture( D3DDEVICE, "etc_Tail2.bmp", 2 );
} else
{
if( m_pTail->GetType() != 1 ) // 생성되었던 꼬리고 일반보드용이 아니면
m_pTail->ChangeTexture( D3DDEVICE, "etc_Tail1.bmp", 1 ); // 일반보드용으로 텍스쳐 교체.
}
}
if( m_pTail == NULL ) // 아직 할당 안됐으면 할당하고.
{
if( pRideProp->dwID == II_RID_RID_BOR_RIDINGCLOUD ) // 근두운...
{
m_pTail = (CTailEffectBelt*)g_TailEffectMng.AddEffect( g_Neuz.m_pd3dDevice, "etc_Tail2.bmp", 2 );
}
else
{
m_pTail = (CTailEffectBelt*)g_TailEffectMng.AddEffect( g_Neuz.m_pd3dDevice, "etc_Tail1.bmp", 1 );
}
}
D3DXVECTOR3 vPos1, vPos2;
D3DXVECTOR3 vLocal;
FLOAT fAngXZ = pMover->GetAngle();
FLOAT fAngH = pMover->GetAngleX();
AngleToVectorXZ( &vLocal, fAngXZ, -1.0f );
fAngXZ -= 90.0f;
if( fAngXZ < 0 )
fAngXZ += 360.0f;
AngleToVector( &vPos1, fAngXZ, -fAngH, 0.5f );
vPos1 += pMover->GetPos();
vPos1 += vLocal;
fAngXZ = pMover->GetAngle();
fAngH = pMover->GetAngleX();
AngleToVectorXZ( &vLocal, fAngXZ, -1.0f );
fAngXZ += 90.0f;
if( fAngXZ > 360.0f )
fAngXZ -= 360.0f;
AngleToVector( &vPos2, fAngXZ, -fAngH, 0.5f );
vPos2 += pMover->GetPos();
vPos2 += vLocal;
if( m_pTail )
m_pTail->CreateTail( vPos1, vPos2 );
}
}
}
} // 투명모드가 아닐때
}