mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Fix incorrect tilts
This commit is contained in:
parent
ae233b000f
commit
5c23fdda24
3 changed files with 6 additions and 16 deletions
|
@ -1642,18 +1642,8 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
p.rollflip *= -1;
|
||||
}
|
||||
|
||||
p.anglez = 0.0f;
|
||||
p.anglex = 0.0f;
|
||||
|
||||
if (spr->mobj->pitch)
|
||||
{
|
||||
p.anglez = FIXED_TO_FLOAT(-AngleFixed(spr->mobj->pitch));
|
||||
}
|
||||
|
||||
if (spr->mobj->roll)
|
||||
{
|
||||
p.anglex = FIXED_TO_FLOAT(AngleFixed(spr->mobj->roll));
|
||||
}
|
||||
p.anglez = FIXED_TO_FLOAT(AngleFixed(spr->mobj->pitch));
|
||||
p.anglex = FIXED_TO_FLOAT(AngleFixed(spr->mobj->roll));
|
||||
|
||||
// SRB2CBTODO: MD2 scaling support
|
||||
finalscale *= FIXED_TO_FLOAT(interp.scale);
|
||||
|
|
|
@ -2815,9 +2815,9 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
if (hflipped)
|
||||
scalez = -scalez;
|
||||
|
||||
pglRotatef(pos->anglez, 0.0f, 0.0f, -1.0f); // rotate by slope from Kart
|
||||
pglRotatef(pos->angley, 0.0f, -1.0f, 0.0f);
|
||||
pglRotatef(pos->anglez, 0.0f, 0.0f, -1.0f);
|
||||
pglRotatef(pos->anglex, 1.0f, 0.0f, 0.0f);
|
||||
pglRotatef(pos->angley, 0.0f, -1.0f, 0.0f);
|
||||
|
||||
if (pos->roll)
|
||||
{
|
||||
|
|
|
@ -1562,8 +1562,8 @@ void P_SetPitchRollFromSlope(mobj_t *mo, pslope_t *slope)
|
|||
fixed_t tempy = slope->normal.y;
|
||||
fixed_t tempx = slope->normal.x;
|
||||
|
||||
mo->pitch = -R_PointToAngle2(0, 0, FixedSqrt(FixedMul(tempy, tempy) + FixedMul(tempz, tempz)), tempx);
|
||||
mo->roll = -R_PointToAngle2(0, 0, tempz, tempy);
|
||||
mo->pitch = R_PointToAngle2(0, 0, FixedSqrt(FixedMul(tempy, tempy) + FixedMul(tempz, tempz)), tempx);
|
||||
mo->roll = R_PointToAngle2(0, 0, tempz, tempy);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue