From 891f687107ad1d4267a99267420cdc6a8fbaf8a1 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Tue, 29 Aug 2006 06:52:35 +0000 Subject: [PATCH] -quick fix: enemies don't use NVGs during the daytime git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@488 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Inventory Choosing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp index d024637cc..4de846312 100644 --- a/Tactical/Inventory Choosing.cpp +++ b/Tactical/Inventory Choosing.cpp @@ -2995,7 +2995,8 @@ UINT16 PickARandomItem(UINT8 typeIndex, UINT8 maxCoolness, BOOLEAN getMatchingCo } usItem = gArmyItemChoices[ typeIndex ].bItemNo[ uiChoice ]; - if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness && ItemIsLegal(usItem) ) + //Madd: quickfix: don't use NVGs during the day + if ( usItem >= 0 && Item[usItem].ubCoolness <= maxCoolness && ItemIsLegal(usItem) && ( NightTime() || Item[usItem].nightvisionrangebonus == 0 ) ) { // pick a default item in case we don't find anything with a matching coolness, but pick the coolest item we can find if ( defaultItem == 0 || Item[usItem].ubCoolness > Item[defaultItem].ubCoolness )