From 4e4a5c18d0addc456b80dca56beede2c114e6f61 Mon Sep 17 00:00:00 2001 From: jnmartin84 Date: Sun, 13 Apr 2025 08:47:33 -0400 Subject: [PATCH] remove erroneous division by 16 in `magnitude` calculation (wing collision) this restores the behavior of ship rolling on wing collision with side of track there may still be other code to tweak as this seems more sensitive than PSX behavior --- src/wipeout/ship.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wipeout/ship.c b/src/wipeout/ship.c index 6ab107b..3b19828 100644 --- a/src/wipeout/ship.c +++ b/src/wipeout/ship.c @@ -639,9 +639,9 @@ void ship_resolve_wing_collision(ship_t *self, track_face_t *face, float directi self->velocity = vec3_reflect(self->velocity, face->normal, 2); self->position = vec3_sub(self->position, vec3_mulf(self->velocity, 0.015625)); // system_tick? self->velocity = vec3_sub(self->velocity, vec3_mulf(self->velocity, 0.5)); - self->velocity = vec3_add(self->velocity, vec3_mulf(face->normal, 4096)); // div by 4096? + self->velocity = vec3_add(self->velocity, vec3_mulf(face->normal, 4096.0)); // div by 4096? - float magnitude = (fabsf(angle) * self->speed) * M_PI / (4096 * 16.0); // (6 velocity shift, 12 angle shift?) + float magnitude = (fabsf(angle) * self->speed) * M_PI / 4096.0; // (6 velocity shift, 12 angle shift?) vec3_t wing_pos; if (direction > 0) {