mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- 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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user