Skip to content

Commit

Permalink
dont show hit indicator for 1 player
Browse files Browse the repository at this point in the history
  • Loading branch information
qndel committed Aug 2, 2023
1 parent 0363fc2 commit 36430c0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Source/qol/monhealthbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,16 @@ void DrawMonsterHealthBar(const Surface &out)
}
}

int tagOffset = 5;
for (size_t i = 0; i < Players.size(); i++) {
if (((1U << i) & monster.whoHit) != 0) {
RenderClxSprite(out, (*playerExpTags)[i + 1], position + Displacement { tagOffset, height - 31 });
} else if (Players[i].plractive) {
RenderClxSprite(out, (*playerExpTags)[0], position + Displacement { tagOffset, height - 31 });
if (Players.size() > 1) {
int tagOffset = 5;
for (size_t i = 0; i < Players.size(); i++) {
if (((1U << i) & monster.whoHit) != 0) {
RenderClxSprite(out, (*playerExpTags)[i + 1], position + Displacement { tagOffset, height - 31 });
} else if (Players[i].plractive) {
RenderClxSprite(out, (*playerExpTags)[0], position + Displacement { tagOffset, height - 31 });
}
tagOffset += (*playerExpTags)[0].width();
}
tagOffset += (*playerExpTags)[0].width();
}
}

Expand Down

0 comments on commit 36430c0

Please sign in to comment.