mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +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;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ patch_t *Patch_GetRotatedSprite(
|
|||
size_t frame, size_t spriteangle,
|
||||
boolean flip, boolean adjustfeet,
|
||||
void *info, INT32 rotationangle);
|
||||
angle_t R_ModelRotationAngle(interpmobjstate_t *interp);
|
||||
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
||||
INT32 R_GetRollAngle(angle_t rollangle);
|
||||
#endif
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
fixed_t rollcosang[ROTANGLES];
|
||||
fixed_t rollsinang[ROTANGLES];
|
||||
|
||||
//
|
||||
// R_SpriteRotationAngle
|
||||
//
|
||||
// Gets the rollangle for the input object.
|
||||
//
|
||||
angle_t R_ModelRotationAngle(interpmobjstate_t *interp)
|
||||
{
|
||||
return interp->spriteroll;
|
||||
}
|
||||
|
||||
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp)
|
||||
{
|
||||
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);
|
||||
|
||||
return (rollOrPitch + interp->spriteroll);
|
||||
return (rollOrPitch + R_ModelRotationAngle(interp));
|
||||
}
|
||||
|
||||
INT32 R_GetRollAngle(angle_t rollangle)
|
||||
|
|
Loading…
Reference in a new issue