Skip to content

Commit

Permalink
fix: DRY
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushaway authored Apr 29, 2024
1 parent 2c27087 commit 0be23a5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions addons/sourcemod/scripting/BossHUD.sp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Plugin myinfo = {
name = "BossHUD",
author = "AntiTeal, Cloud Strife, maxime1907",
description = "Show the health of bosses and breakables",
version = "3.6.7",
version = "3.6.8",
url = "antiteal.com"
};

Expand Down Expand Up @@ -1167,16 +1167,15 @@ public void BuildMessage(CBoss boss, bool IsBreakable, int[] TopHits, int tophit

if (g_cVTopHitsTitle.BoolValue)
{
char sTitleUpper[64], sDamageUpper[32], sHitsUpper[32];
FormatEx(sTitleUpper, sizeof(sTitleUpper), "%T", "Top Boss", client);
char sDamageUpper[32], sHitsUpper[32];
FormatEx(sDamageUpper, sizeof(sDamageUpper), "%T", "Damage", client);
FormatEx(sHitsUpper, sizeof(sHitsUpper), "%T", "Hits", client);

StringToUpperCase(sTitleUpper);
StringToUpperCase(sTitle);
StringToUpperCase(sDamageUpper);
StringToUpperCase(sHitsUpper);

FormatEx(szMessage, len, "%s %s [%s]\n", sTitleUpper, IsBreakable ? sDamageUpper : sHitsUpper, szName);
FormatEx(szMessage, len, "%s %s [%s]\n", sTitle, IsBreakable ? sDamageUpper : sHitsUpper, szName);
}
else
{
Expand Down Expand Up @@ -1380,4 +1379,4 @@ int EntitySetHealth(int client, int entity, int value, bool bAdd = true)
AcceptEntityInput(entity, sValue, client, client);
}
return health;
}
}

0 comments on commit 0be23a5

Please sign in to comment.