From a443e5091e780bf7a9e9ec682b595164665b3e5d Mon Sep 17 00:00:00 2001 From: Robin Eklind Date: Wed, 17 Jul 2019 15:12:11 +0200 Subject: [PATCH] Make _pInfraFlag a boolean. _pInfraFlag is only ever used in boolean contexts. --- Source/items.cpp | 4 ++-- Source/player.cpp | 2 +- structs.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index d6958c1fa..74e163057 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -510,9 +510,9 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) plr[p]._pILMaxDam = lmax; if (iflgs & ISPL_INFRAVISION) { - plr[p]._pInfraFlag = 1; + plr[p]._pInfraFlag = TRUE; } else { - plr[p]._pInfraFlag = 0; + plr[p]._pInfraFlag = FALSE; } plr[p]._pBlockFlag = FALSE; diff --git a/Source/player.cpp b/Source/player.cpp index fe82b7cc5..6c182e405 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -587,7 +587,7 @@ void CreatePlayer(int pnum, char c) plr[pnum]._pFireResist = 0; plr[pnum]._pLghtResist = 0; plr[pnum]._pLightRad = 10; - plr[pnum]._pInfraFlag = 0; + plr[pnum]._pInfraFlag = FALSE; if (c == PC_WARRIOR) { plr[pnum]._pAblSpells = (__int64)1 << (SPL_REPAIR - 1); diff --git a/structs.h b/structs.h index d8a9dc3d9..09e5d0030 100644 --- a/structs.h +++ b/structs.h @@ -267,7 +267,7 @@ typedef struct PlayerStruct { char _pFireResist; char _pLghtResist; int _pGold; - int _pInfraFlag; + BOOL _pInfraFlag; int _pVar1; int _pVar2; int _pVar3;