- 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:
silversurfer
2018-11-03 16:11:21 +00:00
parent 7f5d83d220
commit 384572098b
15 changed files with 302 additions and 295 deletions
+2 -2
View File
@@ -2271,7 +2271,7 @@ UINT8 AttachmentAPCost( UINT16 usAttachment, UINT16 usItem, SOLDIERTYPE * pSoldi
{
if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, AMBIDEXTROUS_NT ) )
{
ubAPCost = (UINT8)((ubAPCost * (100 - gSkillTraitValues.ubAMAttachingItemsAPsReduction) / 100) + 0.5);
ubAPCost = (UINT8)(ubAPCost * (100 - gSkillTraitValues.ubAMAttachingItemsAPsReduction) / 100.0f + 0.5f);
}
}
@@ -2290,7 +2290,7 @@ UINT8 AttachmentAPCost( UINT16 usAttachment, OBJECTTYPE * pObj, SOLDIERTYPE * pS
{
if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, AMBIDEXTROUS_NT ) )
{
ubAPCost = (UINT8)((ubAPCost * (100 - gSkillTraitValues.ubAMAttachingItemsAPsReduction) / 100) + 0.5);
ubAPCost = (UINT8)(ubAPCost * (100 - gSkillTraitValues.ubAMAttachingItemsAPsReduction) / 100.0f + 0.5f);
}
}