mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +00:00
Removed FlatAngle.
This commit is contained in:
parent
980a310755
commit
a163220e8c
1 changed files with 3 additions and 4 deletions
|
@ -307,14 +307,13 @@ void GLSprite::Draw(int pass)
|
||||||
}
|
}
|
||||||
|
|
||||||
// [fgsfds] calculate yaw vectors
|
// [fgsfds] calculate yaw vectors
|
||||||
float yawvecX = 0, yawvecY = 0, FlatAngle = 0, rollDegrees = 0;
|
float yawvecX = 0, yawvecY = 0, rollDegrees = 0;
|
||||||
float angleRad = (270. - GLRenderer->mAngles.Yaw).Radians();
|
float angleRad = (270. - GLRenderer->mAngles.Yaw).Radians();
|
||||||
if (actor) rollDegrees = actor->Angles.Roll.Degrees;
|
if (actor) rollDegrees = actor->Angles.Roll.Degrees;
|
||||||
if (isFlatSprite)
|
if (isFlatSprite)
|
||||||
{
|
{
|
||||||
yawvecX = actor->Angles.Yaw.Cos();
|
yawvecX = actor->Angles.Yaw.Cos();
|
||||||
yawvecY = actor->Angles.Yaw.Sin();
|
yawvecY = actor->Angles.Yaw.Sin();
|
||||||
FlatAngle = actor->FlatAngle.Degrees;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// [MC] This is the only thing that I changed in Nash's submission which
|
// [MC] This is the only thing that I changed in Nash's submission which
|
||||||
|
@ -329,7 +328,7 @@ void GLSprite::Draw(int pass)
|
||||||
if (spritetype == RF_PITCHFLATSPRITE)
|
if (spritetype == RF_PITCHFLATSPRITE)
|
||||||
{
|
{
|
||||||
float pitchDegrees = actor->Angles.Pitch.Degrees;
|
float pitchDegrees = actor->Angles.Pitch.Degrees;
|
||||||
mat.Rotate(0, 1, 0, -FlatAngle);
|
mat.Rotate(0, 1, 0, 0);
|
||||||
if (drawRollSpriteActor)
|
if (drawRollSpriteActor)
|
||||||
{
|
{
|
||||||
mat.Rotate(yawvecX, 0, yawvecY, rollDegrees);
|
mat.Rotate(yawvecX, 0, yawvecY, rollDegrees);
|
||||||
|
@ -345,7 +344,7 @@ void GLSprite::Draw(int pass)
|
||||||
// [fgsfds] Rotate the sprite about the sight vector (roll)
|
// [fgsfds] Rotate the sprite about the sight vector (roll)
|
||||||
else if (spritetype == RF_WALLSPRITE)
|
else if (spritetype == RF_WALLSPRITE)
|
||||||
{
|
{
|
||||||
mat.Rotate(0, 1, 0, -FlatAngle);
|
mat.Rotate(0, 1, 0, 0);
|
||||||
if (drawRollSpriteActor)
|
if (drawRollSpriteActor)
|
||||||
mat.Rotate(yawvecX, 0, yawvecY, rollDegrees);
|
mat.Rotate(yawvecX, 0, yawvecY, rollDegrees);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue