mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
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:
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user