From 2b019dd783960c41a921f78fd5c329e4c9904ce7 Mon Sep 17 00:00:00 2001 From: LuKP17 Date: Sat, 27 Dec 2025 19:04:45 +0100 Subject: [PATCH] Ship bounces when shot by missile/rocket --- README.md | 1 - src/wipeout/weapon.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a6b2177..b20e55cf 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,6 @@ Some things from the original game are not yet implemented in this rewrite. This - less punishing physics for ship vs. ship collisions - less punishing physics for sideways ship vs. track collisions (i.e. wall grinding like in newer wipEouts) -- somehow resolve the issue of inevitably running into an enemy that you just shot - add additional external view that behaves more like in modern racing games - dynamic lighting on ships - the scene geometry could use some touch-ups to make an infinite draw distance option less awkward diff --git a/src/wipeout/weapon.c b/src/wipeout/weapon.c index 498b0fbe..b4174575 100755 --- a/src/wipeout/weapon.c +++ b/src/wipeout/weapon.c @@ -442,6 +442,8 @@ void weapon_update_missile(weapon_t *self) { ship->angular_velocity.z += 10 * M_PI; ship->turn_rate_from_hit = rand_float(-M_PI, M_PI); } + track_face_t *face = track_section_get_base_face(ship->section); + ship->velocity = vec3_add(ship->velocity, vec3_mulf(face->normal, 10000)); } } } @@ -490,6 +492,8 @@ void weapon_update_rocket(weapon_t *self) { ship->angular_velocity.z += 10 * M_PI; ship->turn_rate_from_hit = rand_float(-M_PI, M_PI); } + track_face_t *face = track_section_get_base_face(ship->section); + ship->velocity = vec3_add(ship->velocity, vec3_mulf(face->normal, 10000)); } } }