Focus skill: no watched location interrupt bonus if focus is active.

Improved data initialization.
Smart tree top hiding: increased max distance to hide tree in vertical direction.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8950 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-03-05 07:01:51 +00:00
parent b157b47a34
commit d028282b39
6 changed files with 33 additions and 57 deletions
+5 -1
View File
@@ -1804,6 +1804,9 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT8 ubOpponentID, BOOLEAN f
UINT8 ubDistance;
DebugMsg (TOPIC_JA2INTERRUPT,DBG_LEVEL_3,"CalcInterruptDuelPts");
// sevenfm: safety check
Assert(pSoldier);
// extra check to make sure neutral folks never get interrupts
if (pSoldier->aiData.bNeutral)
{
@@ -1846,7 +1849,8 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT8 ubOpponentID, BOOLEAN f
}
}
if (fUseWatchSpots)
// sevenfm: no watch spot bonus when focusing
if (fUseWatchSpots && !(pSoldier->usSoldierFlagMask2 & SOLDIER_TRAIT_FOCUS))
{
// if this is a previously noted spot of enemies, give bonus points!
iPoints += GetWatchedLocPoints( pSoldier->ubID, MercPtrs[ ubOpponentID ]->sGridNo, MercPtrs[ ubOpponentID ]->pathing.bLevel );