From fe497ae71be94555ba2ed564cdfdacc8298d8418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Sun, 16 Oct 2022 02:27:25 +0200 Subject: [PATCH] fix item render --- code/games/sandbox/src/renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/games/sandbox/src/renderer.c b/code/games/sandbox/src/renderer.c index 62ba5c0..5a92fff 100644 --- a/code/games/sandbox/src/renderer.c +++ b/code/games/sandbox/src/renderer.c @@ -139,8 +139,8 @@ void renderer_draw_entry(uint64_t key, entity_view *data, game_world_render_entr }break; case EKIND_ITEM: { Texture2D tex = GetSpriteTexture2D(assets_find(data->asset)); - float x = data->x - (tex.width/2); - float y = data->y - (tex.height/4); + float x = data->x - (WORLD_BLOCK_SIZE/2.0F); + float y = data->y - (WORLD_BLOCK_SIZE/2.0F); float aspect = tex.width/(float)tex.height; float size = WORLD_BLOCK_SIZE/2.0f * aspect; float ofs_x = (WORLD_BLOCK_SIZE-size)/2.0f;