From a597e6d0d54ffc012fde7d58050166303422fd5e Mon Sep 17 00:00:00 2001 From: qndel Date: Fri, 4 Dec 2020 08:31:45 +0100 Subject: [PATCH] fix compiling (#2166) --- Source/items.cpp | 2 +- Source/monster.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 72d50b3a4..32a014f39 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -5212,7 +5212,7 @@ void SpawnBoy(int lvl) { int itype; - if (boylevel > 1 || boyitem._itype == ITYPE_NONE) { + if (boylevel < (lvl >> 1) || boyitem._itype == ITYPE_NONE) { do { item[0]._iSeed = GetRndSeed(); SetRndSeed(item[0]._iSeed); diff --git a/Source/monster.cpp b/Source/monster.cpp index d699fda81..6fa25de90 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -4365,7 +4365,7 @@ void MAI_Garg(int i) return; } - if (Monst->_mhitpoints_mmaxhp> > 1 && !(Monst->_mFlags & MFLAG_NOHEAL)) + if (Monst->_mhitpoints < (Monst->_mmaxhp >> 1) && !(Monst->_mFlags & MFLAG_NOHEAL)) Monst->_mgoal = MGOAL_RETREAT; if (Monst->_mgoal == MGOAL_RETREAT) { if (abs(dx) >= Monst->_mint + 2 || abs(dy) >= Monst->_mint + 2) {