mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fixed bug #82: SHIFT+N allowed both sun goggles and NVGs to be worn at the same time.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2108 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5448,6 +5448,14 @@ void SwapGoggles(SOLDIERTYPE *pTeamSoldier)
|
||||
INT8 bSlot1;
|
||||
int bestBonus;
|
||||
bool itemFound = false;
|
||||
//CHRISL: Before doing anything, we should look at both head slots to see if either slot has some sort of goggles
|
||||
for(bSlot1 = HEAD1POS; bSlot1 <= HEAD2POS; bSlot1++)
|
||||
{
|
||||
if(Item[pTeamSoldier->inv[bSlot1].usItem].brightlightvisionrangebonus > 0)
|
||||
itemFound = true;
|
||||
if(Item[pTeamSoldier->inv[bSlot1].usItem].nightvisionrangebonus > 0)
|
||||
itemFound = true;
|
||||
}
|
||||
//2 head slots
|
||||
for (bSlot1 = HEAD1POS; bSlot1 <= HEAD2POS; bSlot1++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user