mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 23:21:58 +00:00
Do not factor roll and pitch into model rollangle
Those transformations are applied separately so the model tilts in 3d space.
This commit is contained in:
parent
c065029b01
commit
6d9512d290
3 changed files with 8 additions and 7 deletions
|
@ -1611,7 +1611,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
fixed_t anglef = AngleFixed(R_SpriteRotationAngle(&interp));
|
fixed_t anglef = AngleFixed(R_ModelRotationAngle(&interp));
|
||||||
|
|
||||||
p.rollangle = 0.0f;
|
p.rollangle = 0.0f;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ patch_t *Patch_GetRotatedSprite(
|
||||||
size_t frame, size_t spriteangle,
|
size_t frame, size_t spriteangle,
|
||||||
boolean flip, boolean adjustfeet,
|
boolean flip, boolean adjustfeet,
|
||||||
void *info, INT32 rotationangle);
|
void *info, INT32 rotationangle);
|
||||||
|
angle_t R_ModelRotationAngle(interpmobjstate_t *interp);
|
||||||
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
||||||
INT32 R_GetRollAngle(angle_t rollangle);
|
INT32 R_GetRollAngle(angle_t rollangle);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
fixed_t rollcosang[ROTANGLES];
|
fixed_t rollcosang[ROTANGLES];
|
||||||
fixed_t rollsinang[ROTANGLES];
|
fixed_t rollsinang[ROTANGLES];
|
||||||
|
|
||||||
//
|
angle_t R_ModelRotationAngle(interpmobjstate_t *interp)
|
||||||
// R_SpriteRotationAngle
|
{
|
||||||
//
|
return interp->spriteroll;
|
||||||
// Gets the rollangle for the input object.
|
}
|
||||||
//
|
|
||||||
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp)
|
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp)
|
||||||
{
|
{
|
||||||
angle_t viewingAngle = R_PointToAngle(interp->x, interp->y);
|
angle_t viewingAngle = R_PointToAngle(interp->x, interp->y);
|
||||||
|
@ -33,7 +33,7 @@ angle_t R_SpriteRotationAngle(interpmobjstate_t *interp)
|
||||||
|
|
||||||
angle_t rollOrPitch = FixedMul(interp->pitch, pitchMul) + FixedMul(interp->roll, rollMul);
|
angle_t rollOrPitch = FixedMul(interp->pitch, pitchMul) + FixedMul(interp->roll, rollMul);
|
||||||
|
|
||||||
return (rollOrPitch + interp->spriteroll);
|
return (rollOrPitch + R_ModelRotationAngle(interp));
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 R_GetRollAngle(angle_t rollangle)
|
INT32 R_GetRollAngle(angle_t rollangle)
|
||||||
|
|
Loading…
Reference in a new issue