- 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
This commit is contained in:
Wanne
2007-07-19 06:38:26 +00:00
parent 883557c87d
commit f1a166982a
2 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -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)
{