DEADSOFTWARE

Fix player indicator centering
authorJoseph Stalin <granminigun@pm.me>
Tue, 6 Aug 2019 20:24:01 +0000 (01:24 +0500)
committerJoseph Stalin <granminigun@pm.me>
Tue, 6 Aug 2019 20:24:21 +0000 (01:24 +0500)
src/game/g_player.pas

index 81825dfe7bce4b108fbf20570dcdf17a0f8200f4..71a202301fbc3b20aeeea1df5496eae2a60c4b9c 100644 (file)
@@ -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