Skip to content

Commit b0a8b1d

Browse files
committed
tf2: mvm: fix ghost upgrades
Source: ValveSoftware/source-sdk-2013#1892
1 parent e99833b commit b0a8b1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/game/shared/tf/tf_upgrades_shared.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ int GetUpgradeStepData( CTFPlayer *pPlayer, int nWeaponSlot, int nUpgradeIndex,
272272
int nNumSteps = 0;
273273

274274
// ...
275-
nNumSteps = RoundFloatToInt( fabsf( ( flCap - flBase ) / flIncrement ) );
276-
nCurrentStep = RoundFloatToInt( fabsf( ( flCurrentAttribValue - flBase ) / flIncrement ) );
275+
nNumSteps = ceilf( fabsf( ( flCap - flBase ) / flIncrement ) );
276+
nCurrentStep = ceilf( fabsf( ( flCurrentAttribValue - flBase ) / flIncrement ) );
277277

278278
// Include the 0th step
279279
return nNumSteps;

0 commit comments

Comments
 (0)