diff --git a/GameVersion.cpp b/GameVersion.cpp index a5732506..9d997d82 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.134" }; + INT16 zVersionLabel[256] = { L"Release v1.13.135" }; #endif diff --git a/JA2.vcproj b/JA2.vcproj index 5a9e9b38..f40dd5ce 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -43,7 +43,7 @@ uiMoneyAmount ); - InsertCommasForDollarFigure( pStr ); - InsertDollarSignInToString( pStr ); - } - - // alternate money like silver or gold - else if ( Item[ usItem ].usItemClass == IC_MONEY ) - { - INT16 pStr2[20]; - swprintf( (wchar_t *)pStr2, L"%ld", pObject->uiMoneyAmount ); - InsertCommasForDollarFigure( pStr2 ); - InsertDollarSignInToString( pStr2 ); - - swprintf( (wchar_t *)pStr, L"%s (%ls)", ItemNames[ usItem ], pStr2 ); - } - - //everything else - else if ( usItem != NOTHING ) + if ( usItem != NOTHING ) { // Retrieve the status of the items // Find the minimum status value - not just the first one INT16 sValue = pObject->bStatus[ 0 ]; - INT16 i; - for(i = 1; i < pObject->ubNumberOfObjects; i++) + + for(INT16 i = 1; i < pObject->ubNumberOfObjects; i++) { if(pObject->bStatus[ i ] < sValue) { @@ -7317,157 +7297,204 @@ void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldi } - //Calculate AP's - INT16 apStr[20]; - if ( Item[ usItem ].usItemClass == IC_GUN )//&& !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle ) + switch( Item[ usItem ].usItemClass ) { - INT16 apStr2[20]; - UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject ); - - swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs ); - - if (GetShotsPerBurst(pObject) > 0) - { - swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) ); - wcscat( apStr, apStr2 ); + case MONEY: + //Money + { + swprintf( (wchar_t *)pStr, L"%ld", pObject->uiMoneyAmount ); + InsertCommasForDollarFigure( pStr ); + InsertDollarSignInToString( pStr ); } - else - { - wcscat( apStr, L" / -" ); + break; + + case IC_MONEY: + // alternate money like silver or gold + //if ( Item[ usItem ].usItemClass == IC_MONEY ) + { + INT16 pStr2[20]; + swprintf( (wchar_t *)pStr2, L"%ld", pObject->uiMoneyAmount ); + InsertCommasForDollarFigure( pStr2 ); + InsertDollarSignInToString( pStr2 ); + + swprintf( (wchar_t *)pStr, L"%s (%ls)", ItemNames[ usItem ], pStr2 ); } + break; - if (GetAutofireShotsPerFiveAPs(pObject) > 0) + case IC_GUN: + case IC_LAUNCHER: { - swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) ); - wcscat( apStr, apStr2 ); + //Calculate AP's + INT16 apStr[20]; + INT16 apStr2[20]; + UINT8 ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject ); + + swprintf( (wchar_t *)apStr, L"%d", ubAttackAPs ); + + if (GetShotsPerBurst(pObject) > 0) + { + swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) ); + wcscat( apStr, apStr2 ); + } + else + { + wcscat( apStr, L" / -" ); + } + + if (GetAutofireShotsPerFiveAPs(pObject) > 0) + { + swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) ); + wcscat( apStr, apStr2 ); + } + else + { + wcscat( apStr, L" / -" ); + } + + //Info for weapons + swprintf( (wchar_t *)pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s", + ItemNames[ usItem ], + AmmoCaliber[ Weapon[ usItem ].ubCalibre ], + sValue, + gWeaponStatsDesc[ 9 ], //Accuracy String + Weapon[ usItem ].bAccuracy, + gWeaponStatsDesc[ 11 ], //Damage String + GetDamage(pObject), + gWeaponStatsDesc[ 10 ], //Range String + GunRange( pObject ), //Modified Range + Weapon[ usItem ].usRange, //Gun Range + gWeaponStatsDesc[ 5 ], //AP String + apStr, //AP's + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); } - else + break; + + case IC_BLADE: + case IC_THROWING_KNIFE: + case IC_PUNCH: { - wcscat( apStr, L" / -" ); + swprintf( (wchar_t *)pStr, L"%s\n%s %d\n%s %d\n%s %1.1f %s", + ItemNames[ usItem ], + gWeaponStatsDesc[ 11 ], //Damage String + GetDamage(pObject), //Melee damage + gWeaponStatsDesc[ 5 ], //AP String + BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, pObject ), //AP's + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); } - } - else - { - swprintf( (wchar_t *)apStr, L"" ); - } + break; - //Info for weapons - if ( Item[ usItem ].usItemClass == IC_GUN )//&& !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle ) - { - swprintf( (wchar_t *)pStr, L"%s (%s) [%d%%]\n%s %d\n%s %d\n%s %d (%d)\n%s %s\n%s %1.1f %s", - ItemNames[ usItem ], - AmmoCaliber[ Weapon[ usItem ].ubCalibre ], - sValue, - gWeaponStatsDesc[ 9 ], //Accuracy String - Weapon[ usItem ].bAccuracy, - gWeaponStatsDesc[ 11 ], //Damage String - GetDamage(pObject), - gWeaponStatsDesc[ 10 ], //Range String - GunRange( pObject ), //Modified Range - Weapon[ usItem ].usRange, //Gun Range - gWeaponStatsDesc[ 5 ], //AP String - apStr, //AP's - gWeaponStatsDesc[ 12 ], //Weight String - fWeight, //Weight - GetWeightUnitString() //Weight units - ); - } - - - // The next is for ammunition which gets the measurement 'rnds' - else if (Item[ usItem ].usItemClass == IC_AMMO) - { - swprintf( (wchar_t *)pStr, L"%s [%d rnds]\n%s %1.1f %s", - ItemNames[ usItem ], //Item long name - pObject->ubShotsLeft[0], //Shots left - gWeaponStatsDesc[ 12 ], //Weight String - fWeight, //Weight - GetWeightUnitString() //Weight units - ); - - //Lal: do not delete, commented out for next version - //swprintf( (wchar_t *)pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s", - // AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre - // AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type - // MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type - // Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity - // pObject->ubShotsLeft[0], //Shots left - // gWeaponStatsDesc[ 12 ], //Weight String - // fWeight, //Weight - // GetWeightUnitString() //Weight units - // ); - } - - // explosives - else if ( (Item[ usItem ].usItemClass == IC_GRENADE)||(Item[ usItem ].usItemClass == IC_BOMB) ) - { - UINT16 explDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ); - UINT16 explStunDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ); - - swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s", - ItemNames[ usItem ], - sValue, - gWeaponStatsDesc[ 11 ], //Damage String - explDamage, - gWeaponStatsDesc[ 13 ], //Stun Damage String - explStunDamage, //Stun Damage - gWeaponStatsDesc[ 12 ], //Weight String - fWeight, //Weight - GetWeightUnitString() //Weight units - ); - } - - //Armor - else if (Item[ usItem ].usItemClass == IC_ARMOUR) - { - INT32 iProtection = EffectiveArmour( pObject ); - - switch( Armour[ Item[ usItem ].ubClassIndex ].ubArmourClass ) + case IC_AMMO: { - case( ARMOURCLASS_HELMET ): - iProtection = 15 * iProtection / Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection; - break; + // The next is for ammunition which gets the measurement 'rnds' + swprintf( (wchar_t *)pStr, L"%s [%d rnds]\n%s %1.1f %s", + ItemNames[ usItem ], //Item long name + pObject->ubShotsLeft[0], //Shots left + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); - case( ARMOURCLASS_VEST ): - iProtection = 65 * iProtection / ( Armour[ Item[ SPECTRA_VEST_18 ].ubClassIndex ].ubProtection + Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection ); - break; - - case( ARMOURCLASS_LEGGINGS ): - iProtection = 25 * iProtection / Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection; - break; - - case( ARMOURCLASS_PLATE ): - iProtection = 65 * iProtection / ( Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection ); - break; + //Lal: do not delete, commented out for next version + //swprintf( (wchar_t *)pStr, L"%s %s %s %d [%d rnds]\n%s %1.1f %s", + // AmmoCaliber[ Magazine[ Item[usItem].ubClassIndex ].ubCalibre ], //Ammo calibre + // AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type + // MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type + // Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity + // pObject->ubShotsLeft[0], //Shots left + // gWeaponStatsDesc[ 12 ], //Weight String + // fWeight, //Weight + // GetWeightUnitString() //Weight units + // ); } + break; - swprintf( (wchar_t *)pStr, L"%s [%d %%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s", - ItemNames[ usItem ], //Item long name - sValue, //Item condition - pInvPanelTitleStrings[ 4 ], //Protection string - iProtection, //Protection rating in % based on best armor - Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data) - Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100, - pInvPanelTitleStrings[ 3 ], //Camo string - Item[ usItem ].camobonus, //Camo bonus - gWeaponStatsDesc[ 12 ], //Weight string - fWeight, //Weight - GetWeightUnitString() //Weight units - ); + case IC_GRENADE: + case IC_BOMB: + // explosives + { + UINT16 explDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ); + UINT16 explStunDamage = (UINT16)( Explosive[Item[ usItem ].ubClassIndex].ubStunDamage + ( (double) Explosive[Item[ usItem ].ubClassIndex].ubStunDamage / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ); + + swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %d\n%s %d\n%s %1.1f %s", + ItemNames[ usItem ], + sValue, + gWeaponStatsDesc[ 11 ], //Damage String + explDamage, + gWeaponStatsDesc[ 13 ], //Stun Damage String + explStunDamage, //Stun Damage + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); + } + break; + + case IC_ARMOUR: + { + //Armor + INT32 iProtection = EffectiveArmour( pObject ); + + switch( Armour[ Item[ usItem ].ubClassIndex ].ubArmourClass ) + { + case( ARMOURCLASS_HELMET ): + iProtection = 15 * iProtection / Armour[ Item[ SPECTRA_HELMET_18 ].ubClassIndex ].ubProtection; + break; + + case( ARMOURCLASS_VEST ): + iProtection = 65 * iProtection / ( Armour[ Item[ SPECTRA_VEST_18 ].ubClassIndex ].ubProtection + Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection ); + break; + + case( ARMOURCLASS_LEGGINGS ): + iProtection = 25 * iProtection / Armour[ Item[ SPECTRA_LEGGINGS_18 ].ubClassIndex ].ubProtection; + break; + + case( ARMOURCLASS_PLATE ): + iProtection = 65 * iProtection / ( Armour[ Item[ CERAMIC_PLATES ].ubClassIndex ].ubProtection ); + break; + } + + swprintf( (wchar_t *)pStr, L"%s [%d %%]\n%s %d%% (%d/%d)\n%s %d%%\n%s %1.1f %s", + ItemNames[ usItem ], //Item long name + sValue, //Item condition + pInvPanelTitleStrings[ 4 ], //Protection string + iProtection, //Protection rating in % based on best armor + Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data) + Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100, + pInvPanelTitleStrings[ 3 ], //Camo string + Item[ usItem ].camobonus, //Camo bonus + gWeaponStatsDesc[ 12 ], //Weight string + fWeight, //Weight + GetWeightUnitString() //Weight units + ); + } + break; + + + case IC_MISC: + case IC_MEDKIT: + case IC_KIT: + case IC_FACE: + default: + { + // The final, and typical case, is that of an item with a percent status + swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %1.1f %s", + ItemNames[ usItem ], //Item long name + sValue, //Item condition + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); + } + break; } - // The final, and typical case, is that of an item with a percent status - else - { - swprintf( (wchar_t *)pStr, L"%s [%d%%]\n%s %1.1f %s", - ItemNames[ usItem ], //Item long name - sValue, //Item condition - gWeaponStatsDesc[ 12 ], //Weight String - fWeight, //Weight - GetWeightUnitString() //Weight units - ); - } // Fingerprint ID (Soldier Name) if ( ( Item[pObject->usItem].fingerprintid ) && pObject->ubImprintID < NO_PROFILE ) @@ -7477,6 +7504,7 @@ void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldi wcscat( pStr, pStr2 ); } + // Add attachment string.... for ( cnt = 0; cnt < MAX_ATTACHMENTS; cnt++ ) { @@ -7501,6 +7529,7 @@ void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldi { wcscat( pStr, pMessageStrings[ MSG_END_ATTACHMENT_LIST ] ); } + } else { diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 459cb0a5..9cdca11d 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -6244,19 +6244,17 @@ INT16 GetVisionRangeBonus( SOLDIERTYPE * pSoldier ) { INT16 bns=0; - for (int i = 0; i < BIGPOCK1POS; i++) + for (int i = HELMETPOS; i < BIGPOCK1POS; i++) { // Snap (TODO): binoculars and such should not be active by default - if ( (i == HANDPOS || i == SECONDHANDPOS) && - (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) + if ( (i == HANDPOS || i == SECONDHANDPOS) && (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) { continue; } if (!IsWeapon(pSoldier->inv[i].usItem) || (IsWeapon(pSoldier->inv[i].usItem) && WeaponReady(pSoldier) ) ) { - bns += BonusReduceMore( Item[pSoldier->inv[i].usItem].visionrangebonus, - pSoldier->inv[i].bStatus[0] ); + bns += BonusReduceMore( Item[pSoldier->inv[i].usItem].visionrangebonus, pSoldier->inv[i].bStatus[0] ); } } @@ -6265,8 +6263,7 @@ INT16 GetVisionRangeBonus( SOLDIERTYPE * pSoldier ) { for (int i=0; i < MAX_ATTACHMENTS; i++) { - bns += BonusReduceMore( Item[pSoldier->inv[HANDPOS].usAttachItem[i]].visionrangebonus, - pSoldier->inv[HANDPOS].bAttachStatus[i] ); + bns += BonusReduceMore( Item[pSoldier->inv[HANDPOS].usAttachItem[i]].visionrangebonus, pSoldier->inv[HANDPOS].bAttachStatus[i] ); } } @@ -6291,11 +6288,10 @@ INT16 GetNightVisionRangeBonus( SOLDIERTYPE * pSoldier, UINT8 bLightLevel ) { INT16 bns=0; - for (int i = 0; i < BIGPOCK1POS; i++) + for (int i = HELMETPOS; i < BIGPOCK1POS; i++) { // Snap (TODO): binoculars and such should not be active by default - if ( (i == HANDPOS || i == SECONDHANDPOS) && - (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) + if ( (i == HANDPOS || i == SECONDHANDPOS) && (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) { continue; } @@ -6435,20 +6431,25 @@ INT16 GetTotalVisionRangeBonus( SOLDIERTYPE * pSoldier, UINT8 bLightLevel ) { INT16 bns = GetVisionRangeBonus(pSoldier); - if ( bLightLevel > NORMAL_LIGHTLEVEL_DAY ) { - if ( pSoldier->bLevel == 0 ) { + if ( bLightLevel > NORMAL_LIGHTLEVEL_DAY ) + { + if ( pSoldier->bLevel == 0 ) + { bns += GetNightVisionRangeBonus(pSoldier, bLightLevel); } - else { + else + { bns += GetCaveVisionRangeBonus(pSoldier, bLightLevel); } } - if ( bLightLevel < NORMAL_LIGHTLEVEL_NIGHT ) { + if ( bLightLevel < NORMAL_LIGHTLEVEL_NIGHT ) + { bns += GetDayVisionRangeBonus(pSoldier, bLightLevel); } - if ( bLightLevel < NORMAL_LIGHTLEVEL_DAY ) { + if ( bLightLevel < NORMAL_LIGHTLEVEL_DAY ) + { bns += GetBrightLightVisionRangeBonus(pSoldier, bLightLevel); } @@ -6457,19 +6458,18 @@ INT16 GetTotalVisionRangeBonus( SOLDIERTYPE * pSoldier, UINT8 bLightLevel ) UINT8 GetPercentTunnelVision( SOLDIERTYPE * pSoldier ) { - UINT8 bns=0; + UINT8 bns = 0; - for (int i = 0; i < BIGPOCK1POS; i++) + for (int i = HELMETPOS; i < BIGPOCK1POS; i++) { - if ( (i == HANDPOS || i == SECONDHANDPOS) && - (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) + if ( (i == HANDPOS || i == SECONDHANDPOS) && (Item[pSoldier->inv[i].usItem].usItemClass & IC_ARMOUR || Item[pSoldier->inv[i].usItem].usItemClass & IC_FACE )) { continue; } - if (!IsWeapon(pSoldier->inv[i].usItem) || (IsWeapon(pSoldier->inv[i].usItem) && WeaponReady(pSoldier) ) ) + if ( !IsWeapon(pSoldier->inv[i].usItem) ) { - bns += Item[pSoldier->inv[i].usItem].percenttunnelvision; + bns = __max( bns, Item[pSoldier->inv[i].usItem].percenttunnelvision ); } } diff --git a/Tactical/opplist.cpp b/Tactical/opplist.cpp index 611d60f2..a419fc54 100644 --- a/Tactical/opplist.cpp +++ b/Tactical/opplist.cpp @@ -1109,7 +1109,7 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, return(0); if ( sDistVisible != STRAIGHT ) - sDistVisible = sDistVisible * ((100 - GetPercentTunnelVision(pSoldier))/100); + sDistVisible = sDistVisible * ( (100 - GetPercentTunnelVision(pSoldier) ) / 100 ); if ( sDistVisible == ANGLE && (pSoldier->bTeam == OUR_TEAM || pSoldier->bAlertStatus >= STATUS_RED ) ) { @@ -1133,7 +1133,8 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, if (pSoldier->bLevel != bLevel) { // add two tiles distance to visibility to/from roofs - sDistVisible += (STRAIGHT_RATIO * 2); //2; + // sDistVisible += (STRAIGHT_RATIO * 2); //2; + sDistVisible += ( sDistVisible / 6 ); //lal changed distance to 1/6 from visible range } // now reduce based on light level; SHADE_MIN is the define for the @@ -1156,7 +1157,7 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, } else { - bLightLevel = LightTrueLevel(sSubjectGridNo, bLevel); + bLightLevel = LightTrueLevel(sSubjectGridNo, bLevel); } // Snap: I think this was intended to give maximum visibility to targets with muzzle flash... @@ -1170,7 +1171,11 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, // Snap: this takes care of all equipment bonuses at all light levels // The rest is special code for robots, bloodcats and NO specialists - sDistVisible += GetTotalVisionRangeBonus(pSoldier, bLightLevel); + sDistVisible += sDistVisible * GetTotalVisionRangeBonus(pSoldier, bLightLevel) / 100; + + + + // give one step better vision for people with nightops if (HAS_SKILL_TRAIT( pSoldier, NIGHTOPS )) @@ -1213,6 +1218,8 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, return(sDistVisible); } + + void EndMuzzleFlash( SOLDIERTYPE * pSoldier ) { UINT32 uiLoop;