Skip to content

Commit

Permalink
split reciprocal
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Jul 12, 2024
1 parent ace2202 commit 0633ba0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/game/client/swarm/rd_collections_equipment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,13 +938,18 @@ void CRD_Equipment_WeaponFact::ApplySchemeSettings( vgui::IScheme *pScheme )

if ( bShowReciprocal )
{
flBaseValue += flSkillValue;
flSkillValue = 0.0f;
float flTotalValue = flBaseValue + flSkillValue;
if ( flTotalValue != 0.0f )
{
flTotalValue = 1.0f / flTotalValue;
}

if ( flBaseValue != 0.0f )
{
flBaseValue = 1.0f / flBaseValue;
}

flSkillValue = flTotalValue - flBaseValue;
}

int iPrecision = m_pFact->Precision;
Expand Down

0 comments on commit 0633ba0

Please sign in to comment.