diff --git a/Source/missiles.cpp b/Source/missiles.cpp index f8693778..9128c705 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -1193,7 +1193,7 @@ bool PlayerMHit(int pnum, Monster *monster, int dist, int mind, int maxd, missil dam = player._pHitPoints - 1; } else { if (!shift) { - dam = (mind << 6) + GenerateRnd((maxd - mind + 1) << 6); + dam = (mind << 6) + (GenerateRnd(maxd - mind + 1) << 6); if (monster == nullptr) if ((player._pIFlags & ISPL_ABSHALFTRAP) != 0) dam /= 2; diff --git a/Source/monster.cpp b/Source/monster.cpp index 21976bbb..01c10346 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1516,7 +1516,7 @@ void MonsterAttackPlayer(int i, int pnum, int hit, int minDam, int maxDam) } } } - int dam = (minDam << 6) + GenerateRnd((maxDam - minDam + 1) << 6); + int dam = (minDam << 6) + (GenerateRnd(maxDam - minDam + 1) << 6); dam = std::max(dam + (player._pIGetHit << 6), 64); if (pnum == MyPlayerId) { if (player.wReflections > 0)