summaryrefslogtreecommitdiff
path: root/src/bullets.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-12 18:06:53 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-12 18:06:53 +0100
commit9528c0c69dba57117f38f84f576af2c81a3b435b (patch)
tree14f3b21a19f3733e05d64e1fc4113af52516a441 /src/bullets.c
parent10ae402862df4337772fe8e35f68ee8ab5bfc224 (diff)
multiplayer
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;