mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-09 05:34:22 +00:00
utils: mdldec: smd.c: simplify proper bone rotation code.
This commit is contained in:
parent
845cee2578
commit
521bc675a2
@ -123,19 +123,13 @@ ProperBoneRotationZ
|
|||||||
*/
|
*/
|
||||||
static void ProperBoneRotationZ( vec_t *motion, float angle )
|
static void ProperBoneRotationZ( vec_t *motion, float angle )
|
||||||
{
|
{
|
||||||
float c, s, x, y;
|
float tmp, rot;
|
||||||
float rot;
|
|
||||||
|
|
||||||
rot = DEG2RAD( angle );
|
rot = DEG2RAD( angle );
|
||||||
|
|
||||||
s = sin( rot );
|
tmp = motion[0];
|
||||||
c = cos( rot );
|
motion[0] = motion[1];
|
||||||
|
motion[1] = -tmp;
|
||||||
x = motion[0];
|
|
||||||
y = motion[1];
|
|
||||||
|
|
||||||
motion[0] = c * x - s * y;
|
|
||||||
motion[1] = s * x + c * y;
|
|
||||||
|
|
||||||
motion[5] += rot;
|
motion[5] += rot;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user