- bug fix: Space selects next squad: next merc was not selected when in interrupt

- changed scope ranges to be % of base visible range



git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@170 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2006-06-05 01:03:17 +00:00
parent d0ea612fb3
commit 7da7984951
5 changed files with 46 additions and 45 deletions
+8 -5
View File
@@ -7106,7 +7106,7 @@ INT16 GetMinRangeForAimBonus( OBJECTTYPE * pObj )
INT16 bns;
bns = Item[pObj->usItem].minrangeforaimbonus;
bns += Item[pObj->usGunAmmoItem].minrangeforaimbonus;
//bns += Item[pObj->usGunAmmoItem].minrangeforaimbonus;
for (int i = 0; i < MAX_ATTACHMENTS; i++)
{
@@ -7119,21 +7119,24 @@ INT16 GetMinRangeForAimBonus( OBJECTTYPE * pObj )
UINT8 AllowedAimingLevels(SOLDIERTYPE * pSoldier)
{
UINT8 aimLevels = 4;
float iScopeBonus = 0;
OBJECTTYPE obj = pSoldier->inv[pSoldier->ubAttackingHand];
BOOLEAN allowed = TRUE;
if ( gGameSettings.fOptions[TOPTION_AIM_LEVEL_RESTRICTION] && Weapon[obj.usItem].ubWeaponType != GUN_RIFLE && Weapon[obj.usItem].ubWeaponType != GUN_SN_RIFLE )
allowed = FALSE;
if ( allowed && IsScoped( &obj ) )
{
if ( GetMinRangeForAimBonus(&obj) >= (UINT8)(gGameExternalOptions.ubStraightSightRange * 3) ) // >= 30% of sight range (~4 tiles by default)
iScopeBonus = ( (float)gGameExternalOptions.ubStraightSightRange * GetMinRangeForAimBonus(&obj) / 100 );
if ( iScopeBonus >= ( (float)gGameExternalOptions.ubStraightSightRange * 0.3) ) // >= 30% of sight range (~4 tiles by default)
{
aimLevels += 2;
}
if ( GetMinRangeForAimBonus(&obj) >= (UINT8)(gGameExternalOptions.ubStraightSightRange * 6) ) // >= 60% of sight range (~9 tiles by default)
{
if ( iScopeBonus >= ( (float)gGameExternalOptions.ubStraightSightRange * 0.6) ) // >= 60% of sight range (~9 tiles by default)
{
aimLevels += 2;
}
}