Browse Source

fix golem detection (#5342)

pull/5345/head
qndel 4 years ago committed by GitHub
parent
commit
f132d4a13a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Source/monster.cpp

2
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

Loading…
Cancel
Save