Код для Spirit of Half-life 1.6 нашей Shambler Team
void CBaseMonster :: SetActivity ( Activity NewActivity )
{
int iSequence;
iSequence = LookupActivity ( NewActivity );
// Set to the desired anim, or default anim if the desired is not present
if ( iSequence > ACTIVITY_NOT_AVAILABLE )
{
if ( pev->sequence != iSequence || !m_fSequenceLoops )
{
// don't reset frame between walk and run
if ( !(m_Activity == ACT_WALK || m_Activity == ACT_RUN) || !(NewActivity == ACT_WALK || NewActivity == ACT_RUN))
pev->frame = 0;
}
pev->sequence = iSequence; // Set to the reset anim (if it's there)
ResetSequenceInfo( );
SetYawSpeed();
}
else
{
// Not available try to get default anim
// ZAEBALO!!!!!
ALERT ( at_aiconsole, "%s has no sequence for act:%d\n", STRING(pev->classname), NewActivity );
pev->sequence = 0; // Set to the reset anim (if it's there)
}
m_Activity = NewActivity; // Go ahead and set this so it doesn't keep trying when the anim is not present
// In case someone calls this with something other than the ideal activity
m_IdealActivity = m_Activity;
}
__________________
"I can't believe it". Это и о смерти Морфеуса сказано.
Shambler Team - кодер, маппер.
Энциклопедия Half-Life
Адрес поста | Один пост | Сообщить модератору | IP: Logged