From 0e837d27a0c417ebba4ab31deffa3f30f776f700 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 5 Sep 2013 19:43:57 +0000 Subject: [PATCH] BACKPACKWEIGHT_LOWERS_AP controls wether backpack weight affects APs negatively git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6364 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 ++- GameSettings.h | 3 +++ Tactical/Points.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index ab2158d3..60b3afed 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1376,7 +1376,8 @@ void LoadGameExternalOptions() gGameExternalOptions.fAllNamedNpcsDecideAction = iniReader.ReadBoolean("Tactical Gameplay Settings", "ALL_NAMED_NPCS_DECIDE_ACTION", FALSE); gGameExternalOptions.fAccessOtherMercInventories = iniReader.ReadBoolean("Tactical Gameplay Settings","ACCESS_OTHER_MERC_INVENTORIES", TRUE); - + gGameExternalOptions.fBackPackWeightLowersAP = iniReader.ReadBoolean("Tactical Gameplay Settings","BACKPACKWEIGHT_LOWERS_AP", TRUE); + //################# Tactical Cover System Settings ################## // CPT: Cover System Settings diff --git a/GameSettings.h b/GameSettings.h index ed84a65a..3b66c78f 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -492,6 +492,9 @@ typedef struct // Flugente - allow accessing other mercs inventory via 'stealing' BOOLEAN fAccessOtherMercInventories; + // Moa - weight of filled backpack lowers our AP + BOOLEAN fBackPackWeightLowersAP; + // WDS - Improve Tony's and Devin's inventory like BR's // silversurfer: not used anymore, see "Tactical\XML_Merchants.cpp" for "useBRSetting" // BOOLEAN tonyUsesBRSetting; diff --git a/Tactical/Points.cpp b/Tactical/Points.cpp index c3601b28..9a38b905 100644 --- a/Tactical/Points.cpp +++ b/Tactical/Points.cpp @@ -504,7 +504,7 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 u } // Check for backpack // Moa: apply penalty for heavily packed backpack (wobble penalty) - if ( UsingNewInventorySystem() == true ) + if ( UsingNewInventorySystem() == true && gGameExternalOptions.fBackPackWeightLowersAP ) { INT8 bSlot= FindBackpackOnSoldier( pSoldier ); if ( bSlot != ITEM_NOT_FOUND )