From 0532a298d20034dbed38137af8aa46a11693ecf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Sun, 11 May 2025 01:12:55 -0300 Subject: [PATCH] fix MDL_USEROTATIONCENTER --- src/r_data/models.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/r_data/models.cpp b/src/r_data/models.cpp index dc2ec93c5..166387cd9 100644 --- a/src/r_data/models.cpp +++ b/src/r_data/models.cpp @@ -184,7 +184,7 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr // 1) Applying actor angle, pitch and roll to the model if (flags & MDL_USEROTATIONCENTER) { - objectToWorldMatrix.translate(rotationCenterX, rotationCenterY/stretch, rotationCenterZ); + objectToWorldMatrix.translate(rotationCenterX, rotationCenterZ/stretch, rotationCenterY); objectToWorldMatrix.rotate(-rotation.Yaw.Degrees(), 0, 1, 0); objectToWorldMatrix.rotate(rotation.Pitch.Degrees(), 0, 0, 1); @@ -197,7 +197,7 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr objectToWorldMatrix.rotate(rotateOffset, xrotate, yrotate, zrotate); } - objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterY/stretch, -rotationCenterZ); + objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterZ/stretch, -rotationCenterY); } else { @@ -210,9 +210,9 @@ VSMatrix FSpriteModelFrame::ObjectToWorldMatrix(FLevelLocals *Level, DVector3 tr // The rotation angle is based on the elapsed time. if(flags & MDL_ROTATING) { - objectToWorldMatrix.translate(rotationCenterX, rotationCenterY/stretch, rotationCenterZ); + objectToWorldMatrix.translate(rotationCenterX, rotationCenterZ/stretch, rotationCenterY); objectToWorldMatrix.rotate(rotateOffset, xrotate, yrotate, zrotate); - objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterY/stretch, -rotationCenterZ); + objectToWorldMatrix.translate(-rotationCenterX, -rotationCenterZ/stretch, -rotationCenterY); } }