mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix incorrect tilts
This commit is contained in:
parent
9dd43d4e4e
commit
64c321fbed
3 changed files with 6 additions and 16 deletions
|
|
@ -1605,18 +1605,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(spr->mobj->scale);
|
||||
|
|
|
|||
|
|
@ -2643,9 +2643,9 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32
|
|||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1227,8 +1227,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…
Add table
Reference in a new issue