diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 11:43:57 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-12 11:43:57 +0200 |
| commit | f73e3661b136d4da4d66ef15b264ec7a958be335 (patch) | |
| tree | 0fe84a543fee9622cfaa1dfd29714347c2496111 /src/wall_item.c | |
| parent | 2e04356bbb1d16c0d519156c3bcf201aea291e09 (diff) | |
new objects
Diffstat (limited to 'src/wall_item.c')
| -rw-r--r-- | src/wall_item.c | 4 |
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) { |
