mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- fixed incorrect rounding in several places in the code
- diagonal movement now uses the proper amount of AP and BP git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8634 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1204,7 +1204,7 @@ INT32 CalculateInsuranceContractCost( INT32 iLength, UINT8 ubMercID )
|
||||
}
|
||||
|
||||
// premium depend on merc's salary, the base insurance rate, and the individual's risk factor at this time
|
||||
uiDailyInsurancePremium = (UINT32) (((pProfile->sSalary * INSURANCE_PREMIUM_RATE * flRiskFactor) / 100) + 0.5);
|
||||
uiDailyInsurancePremium = (UINT32) (pProfile->sSalary * INSURANCE_PREMIUM_RATE * flRiskFactor / 100.0f + 0.5f);
|
||||
// multiply by the insurance contract length
|
||||
uiTotalInsurancePremium = uiDailyInsurancePremium * iLength;
|
||||
|
||||
|
||||
@@ -8986,7 +8986,7 @@ INT8 CalculateMercsAchievementPercentage( INT32 ubProfile )
|
||||
// Calculate percentage
|
||||
if( ulTotalMercPoints != 0 )
|
||||
{
|
||||
uiMercPercentage = (UINT32)(((100 * uiMercPoints)/ulTotalMercPoints)+ 0.5);
|
||||
uiMercPercentage = (UINT32)(100.0f * (FLOAT)uiMercPoints / (FLOAT)ulTotalMercPoints + 0.5f);
|
||||
|
||||
uiMercPercentage = min( 100, uiMercPercentage );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user