mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix: NCTH throws error if not firing at soldier
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6261 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -12145,10 +12145,14 @@ FLOAT CalcNewChanceToHitBaseTargetBonus(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pTar
|
|||||||
|
|
||||||
fBaseModifier += fTempPenalty;
|
fBaseModifier += fTempPenalty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Target has high Agility or Experience and is therefore harder to hit
|
// Flugente: there needs to be a target...
|
||||||
FLOAT fTempPenalty = (FLOAT)__max((pTarget->stats.bExpLevel*10), pTarget->stats.bAgility);
|
if ( pTarget )
|
||||||
fBaseModifier += (fTempPenalty * gGameCTHConstants.BASE_AGILE_TARGET) / 100;
|
{
|
||||||
|
// Target has high Agility or Experience and is therefore harder to hit
|
||||||
|
FLOAT fTempPenalty = (FLOAT)__max((pTarget->stats.bExpLevel*10), pTarget->stats.bAgility);
|
||||||
|
fBaseModifier += (fTempPenalty * gGameCTHConstants.BASE_AGILE_TARGET) / 100;
|
||||||
|
}
|
||||||
|
|
||||||
// INVIS TARGET
|
// INVIS TARGET
|
||||||
if (fCantSeeTarget)
|
if (fCantSeeTarget)
|
||||||
|
|||||||
Reference in New Issue
Block a user