From f1a166982a999f90851534459642ea7963c60112 Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 19 Jul 2007 06:38:26 +0000 Subject: [PATCH] - bugfixes: Fixed two bugs in attacks.cpp, that AalaarDB posted in the Bears Pi git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1074 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TacticalAI/Attacks.cpp | 4 +--- ja2_2005Express.vcproj | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/TacticalAI/Attacks.cpp b/TacticalAI/Attacks.cpp index 5e53b44e2..59d4d2bcd 100644 --- a/TacticalAI/Attacks.cpp +++ b/TacticalAI/Attacks.cpp @@ -248,7 +248,7 @@ void CalcBestShot(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestShot, BOOLEAN shootUns // calc next attack's minimum shooting cost (excludes readying & turning) ubRawAPCost = MinAPsToShootOrStab(pSoldier,pOpponent->sGridNo,FALSE); - if (pOpponent->sGridNo != pSoldier->sLastTarget) + if (pOpponent->sGridNo == pSoldier->sLastTarget) { // raw AP cost calculation included cost of changing target! ubRawAPCost -= AP_CHANGE_TARGET; @@ -1266,8 +1266,6 @@ void CalcBestStab(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestStab, BOOLEAN fBladeAt // if opponent doesn't see the attacker if (pOpponent->bOppList[pSoldier->ubID] != SEEN_CURRENTLY) { - fSurpriseStab = TRUE; - // and he's only one space away from attacker if (SpacesAway(pSoldier->sGridNo,pOpponent->sGridNo) == 1) { diff --git a/ja2_2005Express.vcproj b/ja2_2005Express.vcproj index 17228e1c8..5623e8e5c 100644 --- a/ja2_2005Express.vcproj +++ b/ja2_2005Express.vcproj @@ -1,7 +1,7 @@