mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- bugfix: CTD with tank AI
- removed 2 hardcoded values of 'out-of-sight' range, changed to MaxDistanceVisible function git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@585 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2430,6 +2430,7 @@ void CheckIfShotPossible(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestShot, BOOLEAN s
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CheckIfShotPossible");
|
||||
UINT8 ubMinAPcost;
|
||||
pBestShot->ubPossible = FALSE;
|
||||
pBestShot->bWeaponIn = NO_SLOT;
|
||||
|
||||
if ( !TANK( pSoldier ) )
|
||||
{
|
||||
@@ -2452,7 +2453,7 @@ void CheckIfShotPossible(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestShot, BOOLEAN s
|
||||
RearrangePocket(pSoldier, HANDPOS, pBestShot->bWeaponIn, TEMPORARILY);
|
||||
}
|
||||
|
||||
if ( (!suppressionFire && ( (IsScoped(pObj) && GunRange(pObj) > 30) || pSoldier->bOrders == SNIPER ) ) || (suppressionFire && IsGunAutofireCapable(pSoldier,pBestShot->bWeaponIn ) && GetMagSize(pObj) > 30 && pObj->ubGunShotsLeft > 20 ))
|
||||
if ( (!suppressionFire && ( (IsScoped(pObj) && GunRange(pObj) > MaxDistanceVisible() ) || pSoldier->bOrders == SNIPER ) ) || (suppressionFire && IsGunAutofireCapable(pSoldier,pBestShot->bWeaponIn ) && GetMagSize(pObj) > 30 && pObj->ubGunShotsLeft > 20 ))
|
||||
{
|
||||
// get the minimum cost to attack with this item
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CheckIfShotPossible: getting min aps");
|
||||
|
||||
Reference in New Issue
Block a user