fixed MAX_BACKPACK_WEIGHT_TO_CLIMB not being checked in all places which caused:

- mouse cursor showing blocked path incorrectly and jumping over fence via mouse failing
- endless clock issue at the end of the boxing match if player merc had backpack

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9238 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-01-10 22:44:52 +00:00
parent 7b9d12ff2e
commit 61f1dd4acb
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -122,7 +122,9 @@ INT16 TerrainActionPoints( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, INT8
//CHRISL: We can't jump a fence while wearing a backpack, to consider fences as impassible
// SANDRO - Headrocks change to backpack check implemented
if(sSwitchValue == TRAVELCOST_FENCE && UsingNewInventorySystem() == true && FindBackpackOnSoldier( pSoldier ) != ITEM_NOT_FOUND)
if(sSwitchValue == TRAVELCOST_FENCE && UsingNewInventorySystem() == true && pSoldier->inv[BPACKPOCKPOS].exists() == true
&& ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)pSoldier->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[pSoldier->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb)
&& ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[pSoldier->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)))
{
return(-1);
}