From f132d4a13a9231951728fa6482b321cba6b8c3c0 Mon Sep 17 00:00:00 2001 From: qndel Date: Tue, 13 Sep 2022 18:45:52 +0200 Subject: [PATCH] fix golem detection (#5342) --- Source/monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index acaff20fb..12e4a89ee 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -4624,7 +4624,7 @@ bool Monster::isResistant(missile_id missileType) const bool Monster::isPlayerMinion() const { // This could be HasAnyOf(GOLEM) && HasNoneOf(BERSERK), I think referencing the type and player index is more robust though - return type().type == MT_GOLEM && getId() < sizeof(Players) / sizeof(Players[0]); + return type().type == MT_GOLEM && getId() < Players.size(); } bool Monster::isPossibleToHit() const