Fixed incorrect integer calculation.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8706 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2019-11-22 14:24:21 +00:00
parent d0bfe95c78
commit b29e9700f3
@@ -4369,11 +4369,11 @@ INT32 SellItem( OBJECTTYPE& object, BOOLEAN fAll, BOOLEAN useModifier )
//CHRISL: make price modifier based on current game progress
if(iPriceModifier == 0)
{
iPriceModifier = __max(1, (INT16)((CurrentPlayerProgressPercentage()/5)+.5));
iPriceModifier = max(1, (INT16)(((FLOAT)CurrentPlayerProgressPercentage() / 5.0f) + 0.5f));
}
else if(iPriceModifier == -1)
{
iPriceModifier = __max(1, (INT16)(((100-CurrentPlayerProgressPercentage())/5)+.5));
iPriceModifier = max(1, (INT16)(((100.0f - (FLOAT)CurrentPlayerProgressPercentage()) / 5.0f) + 0.5f));
}
if( Item[ usItemType ].usItemClass == IC_AMMO )