mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix for 1% chance to hit target when distance is > 52
Camo and other effects are taken into account when aiming at a body part Max Distance Visible is more consistent in being calculated based on the soldier and direction rather than a fixed number git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1239 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1511,11 +1511,11 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT8 ubOpponentID, BOOLEAN f
|
||||
// this soldier is moving, so give them a bonus for crawling or swatting at long distances
|
||||
if ( !gbSeenOpponents[ ubOpponentID ][ pSoldier->ubID ] )
|
||||
{
|
||||
if (pSoldier->usAnimState == SWATTING && ubDistance > (MaxDistanceVisible() / 2) ) // more than 1/2 sight distance
|
||||
if (pSoldier->usAnimState == SWATTING && ubDistance > (MaxNormalDistanceVisible() / 2) ) // more than 1/2 sight distance
|
||||
{
|
||||
iPoints++;
|
||||
}
|
||||
else if (pSoldier->usAnimState == CRAWLING && ubDistance > (MaxDistanceVisible() / 4) ) // more than 1/4 sight distance
|
||||
else if (pSoldier->usAnimState == CRAWLING && ubDistance > (MaxNormalDistanceVisible() / 4) ) // more than 1/4 sight distance
|
||||
{
|
||||
iPoints += ubDistance / STRAIGHT;
|
||||
}
|
||||
@@ -1889,7 +1889,7 @@ void ResolveInterruptsVs( SOLDIERTYPE * pSoldier, UINT8 ubInterruptType)
|
||||
if ( ubInterruptType == NOISEINTERRUPT )
|
||||
{
|
||||
// don't grant noise interrupts at greater than max. visible distance
|
||||
if ( PythSpacesAway( pSoldier->sGridNo, pOpponent->sGridNo ) > MaxDistanceVisible() )
|
||||
if ( PythSpacesAway( pSoldier->sGridNo, pOpponent->sGridNo ) > MaxNormalDistanceVisible() )
|
||||
{
|
||||
pOpponent->bInterruptDuelPts = NO_INTERRUPT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user