From 9528c0c69dba57117f38f84f576af2c81a3b435b Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Mon, 12 Dec 2022 18:06:53 +0100 Subject: multiplayer --- src/bullets.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/bullets.c') 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; -- cgit v1.2.3-70-g09d2