From 521bc675a21e3b91e74f1c91b68a655ac8f1321d Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:10:17 +0500 Subject: [PATCH] utils: mdldec: smd.c: simplify proper bone rotation code. --- utils/mdldec/smd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/utils/mdldec/smd.c b/utils/mdldec/smd.c index 43c533c4..1d9bd268 100644 --- a/utils/mdldec/smd.c +++ b/utils/mdldec/smd.c @@ -123,19 +123,13 @@ ProperBoneRotationZ */ static void ProperBoneRotationZ( vec_t *motion, float angle ) { - float c, s, x, y; - float rot; + float tmp, rot; rot = DEG2RAD( angle ); - s = sin( rot ); - c = cos( rot ); - - x = motion[0]; - y = motion[1]; - - motion[0] = c * x - s * y; - motion[1] = s * x + c * y; + tmp = motion[0]; + motion[0] = motion[1]; + motion[1] = -tmp; motion[5] += rot; }