From 99ed65e92fb6613987252707540f4ff767afc8fc Mon Sep 17 00:00:00 2001 From: Goober5000 Date: Mon, 22 Jun 2026 12:40:25 -0400 Subject: [PATCH] fix translation/rotation bugs For standard translation offsets, the wrong axis was being used for translation. Fix that. Also fix a string offset when parsing a custom axis. Follow-up to #4582 and #3056. --- code/model/modelread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/modelread.cpp b/code/model/modelread.cpp index c5f908f7c71..1517717fe1b 100644 --- a/code/model/modelread.cpp +++ b/code/model/modelread.cpp @@ -1300,7 +1300,7 @@ void determine_submodel_movement(bool is_rotation, const char *filename, bsp_inf if (in(p, props, axis_string)) { - if (get_user_vec3d_value(p + 20, movement_axis, true, sm->name, filename)) + if (get_user_vec3d_value(p + strlen(axis_string), movement_axis, true, sm->name, filename)) { if (!fl_near_zero(vm_vec_mag(movement_axis))) vm_vec_normalize(movement_axis); @@ -4075,7 +4075,7 @@ void submodel_canonicalize_translation(bsp_info *sm, submodel_instance *smi) smi->canonical_prev_offset = smi->canonical_offset; // get the vector - switch (sm->rotation_axis_id) + switch (sm->translation_axis_id) { case MOVEMENT_AXIS_X: vm_vec_copy_scale(&smi->canonical_offset, &vmd_x_vector, smi->cur_offset);