Skip to content

Commit

Permalink
FFQuantityItem: Remove unnecessary member variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWillden committed Oct 28, 2020
1 parent eb74818 commit 0e7b35a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 4 additions & 7 deletions cl_dll/ff/vgui/ff_quantityitem.cpp
Expand Up @@ -29,8 +29,6 @@ namespace vgui
m_iHeight = 0;

m_flScale = 1.0f;
m_flScaleX = 1.0f;
m_flScaleY = 1.0f;

m_bDisabled = false;

Expand Down Expand Up @@ -221,13 +219,12 @@ namespace vgui
// "map" screen res to 640/480
float flScaleX = 1 / (640.0f / iScreenWide);
float flScaleY = 1 / (480.0f / iScreenTall);
float flScale = (flScaleX <= flScaleY) ? flScaleX : flScaleY;

if( m_flScaleX != flScaleX || m_flScaleY != flScaleY)
// if user changes resolution
// if user changed resolution
if(m_flScale != flScale)
{
m_flScaleX = flScaleX;
m_flScaleY = flScaleY;
m_flScale = ((m_flScaleX <= m_flScaleY) ? m_flScaleX : m_flScaleY);
m_flScale = flScale;

RecalculateIconPosition(false);
RecalculateLabelPosition(false);
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/ff/vgui/ff_quantityitem.h
Expand Up @@ -42,8 +42,6 @@ namespace vgui
bool m_bDisabled;

float m_flScale;
float m_flScaleX;
float m_flScaleY;

// *** QuantityItem size and paint position offsets ::
int m_iWidth;
Expand Down

0 comments on commit 0e7b35a

Please sign in to comment.