summaryrefslogtreecommitdiff
path: root/src/wall_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wall_item.c')
-rw-r--r--src/wall_item.c4
1 files changed, 2 insertions, 2 deletions
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) {