mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +00:00
Fixed incorrect offsetting for SpriteOffset.
This commit is contained in:
parent
e572bb8db3
commit
751ee7390b
1 changed files with 1 additions and 2 deletions
|
@ -424,11 +424,10 @@ bool HWSprite::CalculateVertices(HWDrawInfo *di, FVector3 *v, DVector3 *vp)
|
|||
// want those calculations here. Credit to PhantomBeta for this.
|
||||
if (offx || offy)
|
||||
{
|
||||
FAngle zero = FAngle::fromDeg(0);
|
||||
FQuaternion quat = FQuaternion::FromAngles(FAngle::fromDeg(270) - di->Viewpoint.HWAngles.Yaw, di->Viewpoint.HWAngles.Pitch, FAngle::fromDeg(0));
|
||||
FVector3 sideVec = quat * FVector3(0, 1, 0);
|
||||
FVector3 upVec = quat * FVector3(0, 0, 1);
|
||||
FVector3 res = sideVec * offx + upVec * offy;
|
||||
FVector3 res = sideVec * -offx + upVec * offy;
|
||||
mat.Translate(res.X, res.Z, res.Y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue