mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user