mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
zombies no longer kick in melee
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5641 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -11868,6 +11868,13 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
else
|
||||
{
|
||||
#endif
|
||||
// Flugente: zombies do not kick
|
||||
BOOLEAN nokick = FALSE;
|
||||
#ifdef ENABLE_ZOMBIES
|
||||
if ( this->IsZombie() )
|
||||
nokick = TRUE;
|
||||
#endif
|
||||
|
||||
// Look at stance of target
|
||||
switch( gAnimControl[ pTSoldier->usAnimState ].ubEndHeight )
|
||||
{
|
||||
@@ -11883,7 +11890,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
if ( gAnimControl[ pTSoldier->usAnimState ].ubEndHeight == ANIM_STAND )
|
||||
{
|
||||
// if we aim for legs, always use kick
|
||||
if ( this->bAimShotLocation == AIM_SHOT_LEGS && !(ubDirection & 1) )
|
||||
if ( this->bAimShotLocation == AIM_SHOT_LEGS && !(ubDirection & 1) && !nokick )
|
||||
{
|
||||
this->EVENT_InitNewSoldierAnim( FOCUSED_HTH_KICK, 0 , FALSE );
|
||||
}
|
||||
@@ -11895,7 +11902,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
// otherwise make it random, but favor the punch a bit
|
||||
else
|
||||
{
|
||||
if ( Random(20) > 8 )
|
||||
if ( nokick || Random(20) > 8 )
|
||||
this->EVENT_InitNewSoldierAnim( FOCUSED_PUNCH, 0 , FALSE );
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( FOCUSED_HTH_KICK, 0 , FALSE );
|
||||
@@ -11904,9 +11911,9 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
else // if crouching enemy
|
||||
{
|
||||
// random if aiming on head, favor kick though
|
||||
if ( this->bAimShotLocation == AIM_SHOT_HEAD || (ubDirection & 1) )
|
||||
if ( this->bAimShotLocation == AIM_SHOT_HEAD || (ubDirection & 1) || nokick )
|
||||
{
|
||||
if ( Random(20) > 12 || (ubDirection & 1))
|
||||
if ( nokick ||Random(20) > 12 || (ubDirection & 1))
|
||||
this->EVENT_InitNewSoldierAnim( FOCUSED_PUNCH, 0 , FALSE );
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( FOCUSED_HTH_KICK, 0 , FALSE );
|
||||
@@ -11923,7 +11930,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
if ( gAnimControl[ pTSoldier->usAnimState ].ubEndHeight == ANIM_STAND )
|
||||
{
|
||||
// if we aim for legs, always use kick
|
||||
if ( this->bAimShotLocation == AIM_SHOT_LEGS && !(ubDirection & 1))
|
||||
if ( this->bAimShotLocation == AIM_SHOT_LEGS && !(ubDirection & 1) && !nokick )
|
||||
{
|
||||
this->EVENT_InitNewSoldierAnim( HTH_KICK, 0 , FALSE );
|
||||
}
|
||||
@@ -11935,7 +11942,7 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
// otherwise make it random, but favor the punch a bit
|
||||
else
|
||||
{
|
||||
if ( Random(20) > 8 )
|
||||
if ( nokick || Random(20) > 8 )
|
||||
this->EVENT_InitNewSoldierAnim( PUNCH, 0 , FALSE );
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( HTH_KICK, 0 , FALSE );
|
||||
@@ -11944,9 +11951,9 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
||||
else // if crouching enemy
|
||||
{
|
||||
// random if aiming on head, favor kick though
|
||||
if ( this->bAimShotLocation == AIM_SHOT_HEAD || (ubDirection & 1))
|
||||
if ( this->bAimShotLocation == AIM_SHOT_HEAD || (ubDirection & 1) || nokick)
|
||||
{
|
||||
if ( Random(20) > 12 || (ubDirection & 1))
|
||||
if ( nokick || Random(20) > 12 || (ubDirection & 1))
|
||||
this->EVENT_InitNewSoldierAnim( PUNCH, 0 , FALSE );
|
||||
else
|
||||
this->EVENT_InitNewSoldierAnim( HTH_KICK, 0 , FALSE );
|
||||
|
||||
Reference in New Issue
Block a user