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
This commit is contained in:
jnmartin84
2025-04-13 08:47:33 -04:00
parent f79ee2392f
commit 4e4a5c18d0
+2 -2
View File
@@ -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) {