# HG changeset patch # User Wuzzy # Date 1590526969 -7200 # Node ID 6a38a30e772aeafbaabb754ef46d755c1cc3f7b5 # Parent ab095fc0256c8106ca6a9aca92e75deb72836af7 Fix wrong team health bar height after calling SetClanColor If you called SetClanColor on a team with a name that had a letter with a descender in it, then called SetClanColor on it, the height of the team bar is 1 pixel less than it should be because it was copied from the name texture. diff -r ab095fc0256c -r 6a38a30e772a hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sun May 24 06:10:25 2020 +0300 +++ b/hedgewars/uConsts.pas Tue May 26 23:02:49 2020 +0200 @@ -171,6 +171,7 @@ cVisibleWater : LongInt = 128; cTeamHealthWidth : LongInt = 128; + cTeamHealthHeight : LongInt = 19 * HDPIScaleFactor; cGearContourThreshold : LongInt = 179; // if water opacity is higher than this, draw contour for some gears when in water cifRandomize = $00000001; diff -r ab095fc0256c -r 6a38a30e772a hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sun May 24 06:10:25 2020 +0300 +++ b/hedgewars/uScript.pas Tue May 26 23:02:49 2020 +0200 @@ -1403,7 +1403,7 @@ end; FreeAndNilTexture(clan^.HealthTex); - clan^.HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, clan^.Teams[0]^.NameTagTex^.h, clan^.Color); + clan^.HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, cTeamHealthHeight, clan^.Color); end; lc_setclancolor:= 0 diff -r ab095fc0256c -r 6a38a30e772a hedgewars/uStore.pas --- a/hedgewars/uStore.pas Sun May 24 06:10:25 2020 +0300 +++ b/hedgewars/uStore.pas Tue May 26 23:02:49 2020 +0200 @@ -327,9 +327,9 @@ for t:= 0 to Pred(ClansCount) do with ClansArray[t]^ do - HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, 19 * HDPIScaleFactor, Color); + HealthTex:= makeHealthBarTexture(cTeamHealthWidth + 5, cTeamHealthHeight, Color); -GenericHealthTexture:= makeHealthBarTexture(cTeamHealthWidth + 5, 19 * HDPIScaleFactor, cWhiteColor) +GenericHealthTexture:= makeHealthBarTexture(cTeamHealthWidth + 5, cTeamHealthHeight, cWhiteColor) end;