From e575ec92be2e6a07054ab4f8af62c80f103254a8 Mon Sep 17 00:00:00 2001 From: pionere Date: Thu, 17 Sep 2020 14:52:27 +0200 Subject: [PATCH] correct stat checks when calculating the item bonuses --- Source/items.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index c66f2aa05..a12ad66ca 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -808,23 +808,23 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) } plr[p]._pStrength = sadd + plr[p]._pBaseStr; - if (plr[myplr]._pStrength <= 0) { - plr[myplr]._pStrength = 0; + if (plr[p]._pStrength < 0) { + plr[p]._pStrength = 0; } plr[p]._pMagic = madd + plr[p]._pBaseMag; - if (plr[myplr]._pMagic <= 0) { - plr[myplr]._pMagic = 0; + if (plr[p]._pMagic < 0) { + plr[p]._pMagic = 0; } plr[p]._pDexterity = dadd + plr[p]._pBaseDex; - if (plr[myplr]._pDexterity <= 0) { - plr[myplr]._pDexterity = 0; + if (plr[p]._pDexterity < 0) { + plr[p]._pDexterity = 0; } plr[p]._pVitality = vadd + plr[p]._pBaseVit; - if (plr[myplr]._pVitality <= 0) { - plr[myplr]._pVitality = 0; + if (plr[p]._pVitality < 0) { + plr[p]._pVitality = 0; } if (plr[p]._pClass == PC_ROGUE) {