From 4e86046d0ca30731e5f74a40ece84a91bad0d378 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 20 Jun 2020 16:14:46 +0000 Subject: [PATCH] Store 32 instead of 31 disabilities git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8827 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Drugs And Alcohol.cpp | 2 +- Tactical/Soldier Control.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tactical/Drugs And Alcohol.cpp b/Tactical/Drugs And Alcohol.cpp index d664dce6..c4dacc42 100644 --- a/Tactical/Drugs And Alcohol.cpp +++ b/Tactical/Drugs And Alcohol.cpp @@ -329,7 +329,7 @@ BOOLEAN DoesMercHaveDisability( SOLDIERTYPE *pSoldier, UINT8 aVal ) if ( pSoldier->newdrugs.drugdisability == aVal ) return TRUE; - if ( pSoldier->usDisabilityFlagMask & ( 1 << aVal ) ) + if ( pSoldier->usDisabilityFlagMask & ( 1 << (aVal - 1) ) ) return TRUE; } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index cf5b8ce3..61950133 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -19316,7 +19316,7 @@ void SOLDIERTYPE::AnnounceDisease( UINT8 aDisease ) void SOLDIERTYPE::AddDisability( UINT8 aDisability ) { - this->usDisabilityFlagMask |= ( 1 << aDisability ); + this->usDisabilityFlagMask |= ( 1 << (aDisability - 1 ) ); } // do we have any disease? fDiagnosedOnly: check for wether we know of this infection fHealableOnly: check wether it can be healed