summaryrefslogtreecommitdiff
path: root/src/bullets.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bullets.c')
-rw-r--r--src/bullets.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bullets.c b/src/bullets.c
index c2f6d3b..191b342 100644
--- a/src/bullets.c
+++ b/src/bullets.c
@@ -169,10 +169,10 @@ void draw_bullets(platform_window* window) {
for (int i = 0; i < max_bullets; i++) {
bullet b = bullets[i];
if (!b.active) continue;
- player p = get_player_by_id(b.player_id);
- bullets[i].position.x = p.gunx;
- bullets[i].position.y = p.guny;
- bullets[i].position.z = p.gun_height;
+ player *p = get_player_by_id(b.player_id);
+ bullets[i].position.x = p->gunx;
+ bullets[i].position.y = p->guny;
+ bullets[i].position.z = p->gun_height;
if (check_if_bullet_collided_with_ground(&b, window)) {
bullets[i].endy = b.endy;