mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Punching: don't use kick animation when attacking with weapon in hand
Stealing: don't turn to attacker when lying prone (to prevent possible endless clock) Bayonet: - fix: disable wirecutters cursor in bayonet mode - always use STAB attack for bayonet - always give MELEE bonus when using bayonet git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8263 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -12161,7 +12161,8 @@ void SOLDIERTYPE::EVENT_SoldierBeginBladeAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( Random( 50 ) > 25 )
|
// sevenfm: always use STAB attack for bayonet
|
||||||
|
if ( Random( 50 ) > 25 || this->bWeaponMode == WM_ATTACHED_BAYONET)
|
||||||
{
|
{
|
||||||
this->EVENT_InitNewSoldierAnim( STAB, 0, FALSE );
|
this->EVENT_InitNewSoldierAnim( STAB, 0, FALSE );
|
||||||
}
|
}
|
||||||
@@ -12394,6 +12395,12 @@ void SOLDIERTYPE::EVENT_SoldierBeginPunchAttack( INT32 sGridNo, UINT8 ubDirectio
|
|||||||
if ( this->IsZombie( ) )
|
if ( this->IsZombie( ) )
|
||||||
nokick = TRUE;
|
nokick = TRUE;
|
||||||
|
|
||||||
|
// sevenfm: don't use kick when attacking with any weapon in hand
|
||||||
|
if( this->inv[ HANDPOS ].exists() )
|
||||||
|
{
|
||||||
|
nokick = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// Look at stance of target
|
// Look at stance of target
|
||||||
switch ( gAnimControl[pTSoldier->usAnimState].ubEndHeight )
|
switch ( gAnimControl[pTSoldier->usAnimState].ubEndHeight )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -178,7 +178,12 @@ UINT8 GetProperItemCursor( UINT8 ubSoldierID, UINT16 ubItemIndex, INT32 usMapPos
|
|||||||
|
|
||||||
case KNIFECURS:
|
case KNIFECURS:
|
||||||
//Madd: quick hack to make wirecutter cursor appear when using a knife that can cut through wire
|
//Madd: quick hack to make wirecutter cursor appear when using a knife that can cut through wire
|
||||||
if ( Item[ubItemIndex].wirecutters && IsCuttableWireFenceAtGridNo( sTargetGridNo ) && pSoldier->pathing.bLevel == 0 )
|
// sevenfm: check that not using bayonet attached to the gun
|
||||||
|
//if ( Item[ubItemIndex].wirecutters && IsCuttableWireFenceAtGridNo( sTargetGridNo ) && pSoldier->pathing.bLevel == 0 )
|
||||||
|
if ( Item[ubItemIndex].wirecutters &&
|
||||||
|
IsCuttableWireFenceAtGridNo( sTargetGridNo ) &&
|
||||||
|
pSoldier->pathing.bLevel == 0 &&
|
||||||
|
pSoldier->bWeaponMode != WM_ATTACHED_BAYONET)
|
||||||
{
|
{
|
||||||
ubCursorID = GOOD_WIRECUTTER_UICURSOR;
|
ubCursorID = GOOD_WIRECUTTER_UICURSOR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3703,7 +3703,8 @@ BOOLEAN UseHandToHand( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo, BOOLEAN fStea
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SANDRO - Enhanced Close Combat System - Notice merc after stealing
|
// SANDRO - Enhanced Close Combat System - Notice merc after stealing
|
||||||
if (gGameExternalOptions.fEnhancedCloseCombatSystem)
|
// sevenfm: don't turn when lying prone
|
||||||
|
if (gGameExternalOptions.fEnhancedCloseCombatSystem && gAnimControl[ pTargetSoldier->usAnimState ].ubEndHeight != ANIM_PRONE)
|
||||||
pTargetSoldier->EVENT_SetSoldierDesiredDirection( GetDirectionFromGridNo( pSoldier->sGridNo, pTargetSoldier ) );
|
pTargetSoldier->EVENT_SetSoldierDesiredDirection( GetDirectionFromGridNo( pSoldier->sGridNo, pTargetSoldier ) );
|
||||||
|
|
||||||
// 0verhaul: Also handled in the animation transition
|
// 0verhaul: Also handled in the animation transition
|
||||||
@@ -10400,13 +10401,18 @@ INT32 HTHImpact( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pTarget, INT32 iHitBy, BO
|
|||||||
// DAMAGE BONUS TO KNIFE ATTACK WITH MELEE SKILL
|
// DAMAGE BONUS TO KNIFE ATTACK WITH MELEE SKILL
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( HAS_SKILL_TRAIT( pSoldier, MELEE_NT ) && ( gGameOptions.fNewTraitSystem ))
|
// sevenfm: always give MELEE bonus when using bayonet
|
||||||
|
if( pSoldier->bWeaponMode == WM_ATTACHED_BAYONET )
|
||||||
|
{
|
||||||
|
iBonus += gSkillTraitValues.ubMEDamageBonusBlades; // +30% damage
|
||||||
|
}
|
||||||
|
else if ( HAS_SKILL_TRAIT( pSoldier, MELEE_NT ) && ( gGameOptions.fNewTraitSystem ))
|
||||||
{
|
{
|
||||||
iBonus += gSkillTraitValues.ubMEDamageBonusBlades; // +30% damage
|
iBonus += gSkillTraitValues.ubMEDamageBonusBlades; // +30% damage
|
||||||
|
|
||||||
if (pSoldier->usAnimState == FOCUSED_STAB)
|
if (pSoldier->usAnimState == FOCUSED_STAB)
|
||||||
{
|
{
|
||||||
iBonus += gSkillTraitValues.usMEAimedMeleeAttackDamageBonus; // 50% incresed damage if focused melee attack
|
iBonus += gSkillTraitValues.usMEAimedMeleeAttackDamageBonus; // 50% increased damage if focused melee attack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Enhanced Close Combat System
|
// Enhanced Close Combat System
|
||||||
|
|||||||
Reference in New Issue
Block a user