From e278e14f429f70dcd91877756e21509e34245e3c Mon Sep 17 00:00:00 2001 From: lalien Date: Tue, 30 May 2006 19:38:48 +0000 Subject: [PATCH] - vision range bonus applied only in front direction when using scope or another item with tunnel vision effect git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@137 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 2 +- JA2.vcproj | 4 ++-- Tactical/opplist.cpp | 21 +++++++++++++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 9d997d82c..651cc1549 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.135" }; + INT16 zVersionLabel[256] = { L"Release v1.13.136" }; #endif diff --git a/JA2.vcproj b/JA2.vcproj index f40dd5ce9..bbf93ff46 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -43,7 +43,7 @@ 0) + { + sideViewLimit = TRUE; + sDistVisible = sDistVisible * (100 - tunnelVisionInPercent ) / 100 ; + } + } + +// ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"sDistVisible: %d", GetPercentTunnelVision(pSoldier) ); if ( sDistVisible == ANGLE && (pSoldier->bTeam == OUR_TEAM || pSoldier->bAlertStatus >= STATUS_RED ) ) { @@ -1171,8 +1182,10 @@ 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 += sDistVisible * GetTotalVisionRangeBonus(pSoldier, bLightLevel) / 100; - + if (!sideViewLimit) + { + sDistVisible += sDistVisible * GetTotalVisionRangeBonus(pSoldier, bLightLevel) / 100; + }