]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minigames: center bulldozer icon in the player status hud
authorterencehill <piuntn@gmail.com>
Wed, 30 Dec 2020 22:21:41 +0000 (23:21 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 30 Dec 2020 22:21:41 +0000 (23:21 +0100)
qcsrc/common/minigames/minigame/bd.qc

index 2aea16c54206be9cf423c0bfe922bf969c5625f0..a7a123243dc2a193a4bee1d12a01ecc5936f3600 100644 (file)
@@ -1143,9 +1143,10 @@ void bd_hud_status(vector pos, vector mySize)
                        string thepiece = "bd/dozer";
                        if(active_minigame.minigame_flags & BD_TURN_EDIT)
                                thepiece = bd_get_tile_pic(bd_curr_tile);
-                       drawpic( mypos,
+                       const float tile_scale = 0.7;
+                       drawpic( mypos + tile_size * 0.5 * (1 - tile_scale),
                                        minigame_texture(thepiece),
-                                       tile_size * 0.7, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
+                                       tile_size * tile_scale, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
 
                        mypos_x += tile_size_x;