From: Joseph Stalin Date: Tue, 6 Aug 2019 20:24:01 +0000 (+0500) Subject: Fix player indicator centering X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=6f611376783122c46f1613ebd74586e3e746c191;p=d2df-sdl.git Fix player indicator centering --- diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 81825df..71a2023 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -2328,12 +2328,12 @@ var begin if FAlive then begin - indX := FObj.X+FObj.Rect.X; - indY := FObj.Y; if g_Texture_Get('TEXTURE_PLAYER_INDICATOR', ID) then begin e_GetTextureSize(ID, @indW, @indH); - e_Draw(ID, indX + indW div 2, indY - indH, 0, True, False); + indX := FObj.X + FObj.Rect.X + (FObj.Rect.Width - indW) div 2; + indY := FObj.Y; + e_Draw(ID, indX, indY - indH, 0, True, False); end; end; //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead