Files
2026-06-01 12:46:52 +02:00

35 lines
825 B
C++

#include "stdafx.h"
// sonador 10.2.1 팻 시스템 구현
#include "SGameOtherPet.h"
#include "SPetStateMachine.h"
SGameOtherPet::SGameOtherPet( int nPetID )
: SGamePet ( nPetID )
, m_dwOldTime ( 0 )
{
m_pStateVM = new SOtherPetStateMachine();
if( m_pStateVM )
m_pStateVM->SetReceiver( this );
}
SGameOtherPet::~SGameOtherPet()
{
}
bool SGameOtherPet::Process( DWORD time, unsigned long procBitSet )
{
if( time - m_dwOldTime > 2000 )
{
m_dwOldTime = time;
if( !IsMoving() && !IsAttacking() && !IsUsingSkill() && IsLive() && !IsReservation() && !IsMount() && !IsMountMode() )
{
SGameAvatarEx* master = static_cast< SGameAvatarEx* >( GetGameObject( m_hMasterHandle ) );
if( master )
SetViewVectorStateIdle( master->GetViewVector() );
}
}
SGamePet::Process( time, procBitSet );
return true;
}