mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-26 14:30:56 +00:00
o updated eclipse from ben
o crouched lerk flight plays flap animation o crouched alien attack animations now play git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@564 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
f5f42ace3a
commit
263bc79fec
3 changed files with 204 additions and 202 deletions
Binary file not shown.
|
@ -2295,8 +2295,10 @@ void CBasePlayer::PreThink(void)
|
||||||
|
|
||||||
|
|
||||||
// If trying to duck, already ducked, or in the process of ducking
|
// If trying to duck, already ducked, or in the process of ducking
|
||||||
if ((pev->button & IN_DUCK) || FBitSet(pev->flags,FL_DUCKING) || (m_afPhysicsFlags & PFLAG_DUCKING) )
|
if ((pev->button & IN_DUCK) || FBitSet(pev->flags,FL_DUCKING) || (m_afPhysicsFlags & PFLAG_DUCKING) ) {
|
||||||
Duck();
|
if ( AvHMUGetCanDuck(this->pev->iuser3) )
|
||||||
|
Duck();
|
||||||
|
}
|
||||||
|
|
||||||
if ( !FBitSet ( pev->flags, FL_ONGROUND ) )
|
if ( !FBitSet ( pev->flags, FL_ONGROUND ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1516,233 +1516,233 @@ void AvHPlayer::GetAnimationForActivity(int inActivity, char outAnimation[64], b
|
||||||
|
|
||||||
//bool theIsBlinking = this->GetIsBlinking();
|
//bool theIsBlinking = this->GetIsBlinking();
|
||||||
|
|
||||||
switch(inActivity)
|
switch(inActivity)
|
||||||
{
|
{
|
||||||
case ACT_RELOAD:
|
case ACT_RELOAD:
|
||||||
if(!theIsAlien)
|
if(!theIsAlien)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_reload");
|
strcat(outAnimation, "_reload");
|
||||||
|
|
||||||
theIsReloading = true;
|
theIsReloading = true;
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
// updated by Elven for TPRAs
|
// updated by Elven for TPRAs
|
||||||
case ACT_RELOAD_START:
|
case ACT_RELOAD_START:
|
||||||
if(!theIsAlien)
|
if(!theIsAlien)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_reload_start");
|
strcat(outAnimation, "_reload_start");
|
||||||
theIsReloading = true;
|
theIsReloading = true;
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ACT_RELOAD_INSERT:
|
case ACT_RELOAD_INSERT:
|
||||||
if(!theIsAlien)
|
if(!theIsAlien)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_reload_insert");
|
strcat(outAnimation, "_reload_insert");
|
||||||
theIsReloading = true;
|
theIsReloading = true;
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ACT_RELOAD_END:
|
case ACT_RELOAD_END:
|
||||||
if(!theIsAlien)
|
if(!theIsAlien)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_reload_end");
|
strcat(outAnimation, "_reload_end");
|
||||||
theIsReloading = true;
|
theIsReloading = true;
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ACT_RANGE_PRIME:
|
case ACT_RANGE_PRIME:
|
||||||
if(theCanCrouch && theIsCrouched)
|
if(theCanCrouch && theIsCrouched)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "crouch_" );
|
strcpy(outAnimation, "crouch_" );
|
||||||
}
|
}
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_prime");
|
strcat(outAnimation, "_prime");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_RANGE_ATTACK1:
|
case ACT_RANGE_ATTACK1:
|
||||||
if(theCanCrouch && theIsCrouched)
|
if(theCanCrouch && theIsCrouched && !theIsAlien )
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "crouch_" );
|
strcpy(outAnimation, "crouch_" );
|
||||||
}
|
}
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
if(theIsAlien)
|
if(theIsAlien)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_alien");
|
strcat(outAnimation, "_alien");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_fire");
|
strcat(outAnimation, "_fire");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_HOP:
|
case ACT_HOP:
|
||||||
strcat(outAnimation, "jump");
|
strcat(outAnimation, "jump");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_WALK:
|
case ACT_WALK:
|
||||||
if(inGaitSequence || !strcmp(this->m_szAnimExtention, ""))
|
if(inGaitSequence || !strcmp(this->m_szAnimExtention, ""))
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "walk");
|
strcat(outAnimation, "walk");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(theCanCrouch && theIsCrouched)
|
if(theCanCrouch && theIsCrouched)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "crouch_" );
|
strcpy(outAnimation, "crouch_" );
|
||||||
}
|
}
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
if(theCanCrouch)
|
if(theCanCrouch)
|
||||||
{
|
{
|
||||||
if(theIsReloading)
|
if(theIsReloading)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_reload");
|
strcat(outAnimation, "_reload");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_look");
|
strcat(outAnimation, "_look");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_RUN:
|
case ACT_RUN:
|
||||||
if(inGaitSequence || !strcmp(this->m_szAnimExtention, ""))
|
if(inGaitSequence || !strcmp(this->m_szAnimExtention, ""))
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "run");
|
strcat(outAnimation, "run");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(theCanCrouch && theIsCrouched)
|
if(theCanCrouch && theIsCrouched)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "crouch_" );
|
strcpy(outAnimation, "crouch_" );
|
||||||
}
|
}
|
||||||
strcat(outAnimation, this->m_szAnimExtention);
|
strcat(outAnimation, this->m_szAnimExtention);
|
||||||
if(theCanCrouch)
|
if(theCanCrouch)
|
||||||
{
|
{
|
||||||
//if(theIsReloading)
|
//if(theIsReloading)
|
||||||
//{
|
//{
|
||||||
// strcat(outAnimation, "_reload");
|
// strcat(outAnimation, "_reload");
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
if(theIsReloading)
|
if(theIsReloading)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, this->m_szAnimExtention);
|
strcpy(outAnimation, this->m_szAnimExtention);
|
||||||
strcat(outAnimation, "_reload");
|
strcat(outAnimation, "_reload");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_look");
|
strcat(outAnimation, "_look");
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_CROUCHIDLE:
|
case ACT_CROUCHIDLE:
|
||||||
if(theCanCrouch)
|
if(theCanCrouch)
|
||||||
{
|
{
|
||||||
if(inGaitSequence)
|
if(inGaitSequence)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "crouch_idle");
|
strcat(outAnimation, "crouch_idle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACT_CROUCH:
|
case ACT_CROUCH:
|
||||||
if(theCanCrouch)
|
if(theCanCrouch)
|
||||||
{
|
{
|
||||||
if(inGaitSequence)
|
if(inGaitSequence)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "crawl");
|
strcat(outAnimation, "crawl");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACT_IDLE:
|
case ACT_IDLE:
|
||||||
// Weird hack/fix for gyrating and ready room spazzing
|
// Weird hack/fix for gyrating and ready room spazzing
|
||||||
//if(this->GetPlayMode() != PLAYMODE_READYROOM)
|
//if(this->GetPlayMode() != PLAYMODE_READYROOM)
|
||||||
//{
|
//{
|
||||||
if(inGaitSequence)
|
if(inGaitSequence)
|
||||||
{
|
{
|
||||||
if(theIsReloading)
|
if(theIsReloading)
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "_reload");
|
strcat(outAnimation, "_reload");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "idle1");
|
strcat(outAnimation, "idle1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(outAnimation, "look_idle");
|
strcat(outAnimation, "look_idle");
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACT_DIESIMPLE:
|
case ACT_DIESIMPLE:
|
||||||
case ACT_DIEVIOLENT:
|
case ACT_DIEVIOLENT:
|
||||||
if(this->pev->iuser3 == AVH_USER3_ALIEN_PLAYER3)
|
if(this->pev->iuser3 == AVH_USER3_ALIEN_PLAYER3)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "death1_die");
|
strcpy(outAnimation, "death1_die");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(theIsCrouched)
|
if(theIsCrouched)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "crouch_die");
|
strcpy(outAnimation, "crouch_die");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch(RANDOM_LONG(0, 2))
|
switch(RANDOM_LONG(0, 2))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
strcpy(outAnimation, "death1_die");
|
strcpy(outAnimation, "death1_die");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
strcpy(outAnimation, "death2_die");
|
strcpy(outAnimation, "death2_die");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
strcpy(outAnimation, "death3_die");
|
strcpy(outAnimation, "death3_die");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theIsDeathAnim = true;
|
theIsDeathAnim = true;
|
||||||
break;
|
break;
|
||||||
case ACT_DIE_HEADSHOT:
|
case ACT_DIE_HEADSHOT:
|
||||||
strcpy(outAnimation, "head_die");
|
strcpy(outAnimation, "head_die");
|
||||||
theIsDeathAnim = true;
|
theIsDeathAnim = true;
|
||||||
break;
|
break;
|
||||||
case ACT_DIE_GUTSHOT:
|
case ACT_DIE_GUTSHOT:
|
||||||
strcpy(outAnimation, "gut_die");
|
strcpy(outAnimation, "gut_die");
|
||||||
theIsDeathAnim = true;
|
theIsDeathAnim = true;
|
||||||
break;
|
break;
|
||||||
case ACT_DIEBACKWARD:
|
case ACT_DIEBACKWARD:
|
||||||
// Hack for skulk until artwork can be updated (it has no back_die)
|
// Hack for skulk until artwork can be updated (it has no back_die)
|
||||||
if(this->pev->iuser3 != AVH_USER3_ALIEN_PLAYER1)
|
if(this->pev->iuser3 != AVH_USER3_ALIEN_PLAYER1)
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "back_die");
|
strcpy(outAnimation, "back_die");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(outAnimation, "gut_die");
|
strcpy(outAnimation, "gut_die");
|
||||||
}
|
}
|
||||||
theIsDeathAnim = true;
|
theIsDeathAnim = true;
|
||||||
break;
|
break;
|
||||||
case ACT_DIEFORWARD:
|
case ACT_DIEFORWARD:
|
||||||
strcpy(outAnimation, "forward_die");
|
strcpy(outAnimation, "forward_die");
|
||||||
theIsDeathAnim = true;
|
theIsDeathAnim = true;
|
||||||
break;
|
break;
|
||||||
case ACT_SWIM:
|
case ACT_SWIM:
|
||||||
// die
|
// die
|
||||||
strcpy(outAnimation, "treadwater");
|
strcpy(outAnimation, "treadwater");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(theIsGestating)
|
if(theIsGestating)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue