added and adjusted the following features by zwwooooo to help restoring IoV to a pure item mod:

- externalized the brightness vision range modifiers to allow for different ratios of day/night vision range
- added <PercentRangeBonus> as a complement to <Rangebonus>
- added the possibility for LBE vests to function as plate carriers

These were the missing features from IoV previously not in the 1.13 trunk. Thereby, IoV is now fully compatible to the current trunk (by DepressivesBrot)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6279 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-08-08 21:08:04 +00:00
parent a543b33c4b
commit fd8b146296
11 changed files with 195 additions and 16 deletions
+7 -4
View File
@@ -588,7 +588,8 @@ INT32 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
else
{
fNight = TRUE;
ubBackgroundLightPercent = gbLightSighting[ 0 ][ ubBackgroundLightLevel ];
ubBackgroundLightPercent = gGameExternalOptions.ubBrightnessVisionMod[ ubBackgroundLightLevel ];
//ubBackgroundLightPercent = gbLightSighting[ 0 ][ ubBackgroundLightLevel ];
}
}
@@ -1009,7 +1010,9 @@ INT32 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
// reduce cover at nighttime based on how bright the light is at that location
// using the difference in sighting distance between the background and the
// light for this tile
ubLightPercentDifference = (gbLightSighting[ 0 ][ LightTrueLevel( sGridNo, pSoldier->pathing.bLevel ) ] - ubBackgroundLightPercent );
//ubLightPercentDifference = (gbLightSighting[ 0 ][ LightTrueLevel( sGridNo, pSoldier->pathing.bLevel ) ] - ubBackgroundLightPercent );
ubLightPercentDifference = (gGameExternalOptions.ubBrightnessVisionMod[ LightTrueLevel( sGridNo, pSoldier->pathing.bLevel ) ] - ubBackgroundLightPercent );
if ( iCoverValue >= 0 )
{
iCoverValue -= (iCoverValue / 100) * ubLightPercentDifference;
@@ -1610,8 +1613,8 @@ INT16 FindNearbyDarkerSpot( SOLDIERTYPE *pSoldier )
// screen out anything brighter than our current best spot
bLightLevel = LightTrueLevel( sGridNo, pSoldier->pathing.bLevel );
bLightDiff = gbLightSighting[0][ bCurrLightLevel ] - gbLightSighting[0][ bLightLevel ];
//bLightDiff = gbLightSighting[0][ bCurrLightLevel ] - gbLightSighting[0][ bLightLevel ];
bLightDiff = gGameExternalOptions.ubBrightnessVisionMod[ bCurrLightLevel ] - gGameExternalOptions.ubBrightnessVisionMod[ bLightLevel ];
// if the spot is darker than our current location, then bLightDiff > 0
// plus ignore differences of just 1 light level
if ( bLightDiff <= 1 )