move this to make it little more clear what this is for
This commit is contained in:
1 parent
e29c1010d3
commit
e5f9623113
1 file changed
+2
-1
+2
-1
@@ -3669,11 +3669,12 @@ void K_RollMobjBySlopes(mobj_t* mo, pslope_t *slope)
|
||||
fixed_t tempz = slope->normal.z;
|
||||
fixed_t tempy = slope->normal.y;
|
||||
fixed_t tempx = slope->normal.x;
|
||||
fixed_t tempangle = -(R_PointToAngle2(0, 0, FixedSqrt(FixedMul(tempy, tempy) + FixedMul(tempz, tempz)), tempx));
|
||||
fixed_t tempangle = 0;
|
||||
|
||||
// admittedly this is a very hacky way to do the pitch and roll easing
|
||||
|
||||
// pitch
|
||||
tempangle = -(R_PointToAngle2(0, 0, FixedSqrt(FixedMul(tempy, tempy) + FixedMul(tempz, tempz)), tempx));
|
||||
an = (INT32)((angle_t)tempangle - mo->pitch_sprite) / SLOPEROLL_DIV;
|
||||
mo->pitch_sprite = an ? mo->pitch_sprite + an : (angle_t)tempangle;
|
||||
mo->slopepitch = flip ? InvAngle(mo->pitch_sprite) : mo->pitch_sprite;
|
||||
|
||||
Reference in new issue
Block a user