From 303fb661e5b2c3015a51a35c38ebaa0c58723b84 Mon Sep 17 00:00:00 2001 From: Wanne Date: Tue, 5 Feb 2013 10:14:49 +0000 Subject: [PATCH] - 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 --- Tactical/Points.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tactical/Points.cpp b/Tactical/Points.cpp index 4eb7b7dd7..6d8916daf 100644 --- a/Tactical/Points.cpp +++ b/Tactical/Points.cpp @@ -2317,8 +2317,9 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime, bAPCost += (usTurningCost + usRaiseGunCost); // 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 - if (ubForceRaiseGunCost || (( sGridNo != pSoldier->sLastTarget ) && !Item[usUBItem].rocketlauncher && (Item[ usUBItem ].usItemClass != IC_THROWING_KNIFE) )) + // 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 )&& + ( Item[ usUBItem ].usItemClass != IC_PUNCH ) && ( Item[ usUBItem ].usItemClass != IC_BLADE ) ) ) { if ( pSoldier->IsValidAlternativeFireMode( bAimTime, sGridNo ) ) bAPCost += (APBPConstants[AP_CHANGE_TARGET] / 2);