mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Fixed AP cursor calculation for melee weapons as no AP add costs incurred for changing targets (by Buggler)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5845 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-2
@@ -2317,8 +2317,9 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime,
|
|||||||
bAPCost += (usTurningCost + usRaiseGunCost);
|
bAPCost += (usTurningCost + usRaiseGunCost);
|
||||||
|
|
||||||
// if attacking a new target (or if the specific target is uncertain)
|
// if attacking a new target (or if the specific target is uncertain)
|
||||||
// Added check if the weapon is a throwing knife - otherwise it would add APs for change target on cursor but not actually deduct them afterwards - SANDRO
|
// Added check if the weapon is throwing knife/melee weapons - otherwise it would add APs for change target on cursor but not actually deduct them afterwards - SANDRO
|
||||||
if (ubForceRaiseGunCost || (( sGridNo != pSoldier->sLastTarget ) && !Item[usUBItem].rocketlauncher && (Item[ usUBItem ].usItemClass != IC_THROWING_KNIFE) ))
|
if ( ubForceRaiseGunCost || (( sGridNo != pSoldier->sLastTarget ) && !Item[usUBItem].rocketlauncher && ( Item[ usUBItem ].usItemClass != IC_THROWING_KNIFE )&&
|
||||||
|
( Item[ usUBItem ].usItemClass != IC_PUNCH ) && ( Item[ usUBItem ].usItemClass != IC_BLADE ) ) )
|
||||||
{
|
{
|
||||||
if ( pSoldier->IsValidAlternativeFireMode( bAimTime, sGridNo ) )
|
if ( pSoldier->IsValidAlternativeFireMode( bAimTime, sGridNo ) )
|
||||||
bAPCost += (APBPConstants[AP_CHANGE_TARGET] / 2);
|
bAPCost += (APBPConstants[AP_CHANGE_TARGET] / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user