Skip to content

Commit

Permalink
Fixed split sprites rotation when using XY billboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Evghenii committed Aug 27, 2024
1 parent f4a758f commit e1cd9e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gl/scene/gl_sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ void GLSprite::Draw(int pass)
// in the x/y plane.
float xcenter = (x1 + x2)*0.5;
float ycenter = (y1 + y2)*0.5;
float zcenter = (z1 + z2)*0.5;
float angleRad = DEG2RAD(270. - float(GLRenderer->mAngles.Yaw));

Matrix3x4 mat;
Expand Down Expand Up @@ -718,6 +717,7 @@ void GLSprite::Process(AActor* thing,sector_t * sector)

z1=z-r.top;
z2=z1-r.height;
zcenter=(z1+z2)*0.5;

float spriteheight = FIXED2FLOAT(spritescaleY) * gltexture->GetScaledHeightFloat(GLUSE_SPRITE);

Expand Down
1 change: 1 addition & 0 deletions src/gl/scene/gl_wall.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class GLSprite
float vt,vb;
float x1,y1,z1;
float x2,y2,z2;
float zcenter; // [geNia] to rotate XY billboard around this point in case the sprite gets split

FMaterial *gltexture;
float trans;
Expand Down

0 comments on commit e1cd9e7

Please sign in to comment.