Skip to content

Commit

Permalink
Fix display appearing in battleground matches
Browse files Browse the repository at this point in the history
  • Loading branch information
Asaayu committed May 23, 2023
1 parent 3483925 commit 93ab63e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hdt-plugin-damagecounter/PluginMain.cs
Expand Up @@ -65,6 +65,10 @@ internal static void UpdateDamageCalculator()
internal static void OnGameStart()
{
ResetCanvas();
if (CoreAPI.Game.IsBattlegroundsMatch) {
OnGameEnd();
return;
}
CoreAPI.OverlayCanvas.Children.Add(DamageCounter.playerDamageLabel);
CoreAPI.OverlayCanvas.Children.Add(DamageCounter.opponentDamageLabel);
UpdateDamageCalculator();
Expand All @@ -78,6 +82,8 @@ internal static void OnGameEnd()

internal static void OnGameUpdate()
{
if (CoreAPI.Game.IsBattlegroundsMatch) return;

SetLabelPosition(
DamageCounter.playerDamageLabel,
DamageCounter.playerPosX,
Expand Down

0 comments on commit 93ab63e

Please sign in to comment.