From f73e3661b136d4da4d66ef15b264ec7a958be335 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 12 May 2024 11:43:57 +0200 Subject: new objects --- src/wall_item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wall_item.c') diff --git a/src/wall_item.c b/src/wall_item.c index 12b5ce7..3e87d77 100644 --- a/src/wall_item.c +++ b/src/wall_item.c @@ -112,8 +112,8 @@ void draw_wallitems(platform_window* window) { player* p = get_player_by_id(player_id); if (!p) continue; - float dirx = ((item.position.x + (0.5)) - (p->playerx + (get_player_size_in_tile()/2))); - float diry = ((item.position.y) - (p->playery + (get_player_size_in_tile()/2))); + float dirx = ((item.position.x + (0.5)) - (p->playerx + (get_player_width_in_tile()/2))); + float diry = ((item.position.y) - (p->playery + (get_player_width_in_tile()/2))); float length = sqrt(dirx * dirx + diry * diry); if (length < 1.0f) { -- cgit v1.2.3-70-g09d2