summaryrefslogtreecommitdiff
path: root/src/bullets.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2024-01-06 16:28:30 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2024-01-06 16:28:30 +0100
commit149a45739e9c89d4a779ebd5e07043b1587ba2e9 (patch)
treea2a46581e7475f16d92212199fc259ce754b2d07 /src/bullets.c
parent08e0f1bef6555896e4d88e53c3f16f609c4e746c (diff)
metal wall impact
Diffstat (limited to 'src/bullets.c')
-rw-r--r--src/bullets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bullets.c b/src/bullets.c
index c09fc31..df06f90 100644
--- a/src/bullets.c
+++ b/src/bullets.c
@@ -237,7 +237,7 @@ void update_bullets_server(platform_window* window) {
bullets[i].endx = b.endx;
b = bullets[i];
- add_object_audio_event_to_queue(EVENT_IMPACT, obj_collision, p->id, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height});
+ add_object_audio_event_to_queue(EVENT_IMPACT, obj_collision, p->id, (vec3f){.x = bullets[i].endx, .y = bullets[i].endy, .z = p->height});
}
if (check_if_bullet_collided_with_zombie(&b, window, p)) {
@@ -247,7 +247,7 @@ void update_bullets_server(platform_window* window) {
b = bullets[i];
add_points_to_player(p, POINTS_PER_HIT);
- add_zombie_audio_event_to_queue(EVENT_IMPACT, ZOMBIE_TYPE_NORMAL, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height});
+ add_zombie_audio_event_to_queue(EVENT_IMPACT, ZOMBIE_TYPE_NORMAL, (vec3f){.x = bullets[i].endx, .y = bullets[i].endy, .z = p->height});
}
}
}