Skip to content

Commit

Permalink
don't scale weapons with no icons in wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaulwurff committed Aug 28, 2021
1 parent d07c2c2 commit 61e20c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zscript/gearbox/wheel/view.zs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,13 @@ class gb_WheelView

TextureID texture = viewModel.icons[iconIndex];
vector2 textureSize = TexMan.getScaledSize(texture) * 2 * mScaleFactor;
textureSize.x *= viewModel.iconScaleXs[iconIndex];
textureSize.y *= viewModel.iconScaleYs[iconIndex];

if (texture.isValid())
{
textureSize.x *= viewModel.iconScaleXs[iconIndex];
textureSize.y *= viewModel.iconScaleYs[iconIndex];
}

bool isTall = (textureSize.y * 1.2 > textureSize.x);

double scale = isTall
Expand Down

0 comments on commit 61e20c5

Please sign in to comment.