Removed FlatAngle.

This commit is contained in:
MajorCooke 2016-05-01 17:30:30 -05:00
parent 980a310755
commit a163220e8c

View file

@ -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);
} }