mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Disable backpack climb check for non-player soldiers (#117)
This commit is contained in:
@@ -4632,10 +4632,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
if ( fNearLowerLevel )
|
||||
{
|
||||
if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true
|
||||
//JMich.BackpackClimb
|
||||
&& ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb)
|
||||
&& ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)))
|
||||
if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack())
|
||||
{
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]);
|
||||
return;
|
||||
@@ -4646,10 +4643,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
if ( fNearHeigherLevel )
|
||||
{
|
||||
if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true
|
||||
//JMich.BackpackClimb
|
||||
&& ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb)
|
||||
&& ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)))
|
||||
if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack())
|
||||
{
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]);
|
||||
return;
|
||||
@@ -4662,10 +4656,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
if (gGameExternalOptions.fCanClimbOnWalls == TRUE)
|
||||
{
|
||||
if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true
|
||||
//JMich.BackpackClimb
|
||||
&& ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb)
|
||||
&& ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)))
|
||||
if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack())
|
||||
{
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]);
|
||||
return;
|
||||
@@ -4681,10 +4672,7 @@ void BtnClimbCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
if ( FindFenceJumpDirection( gpSMCurrentMerc, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->ubDirection, &bDirection ) )
|
||||
{
|
||||
if ((UsingNewInventorySystem() == true) && gpSMCurrentMerc->inv[BPACKPOCKPOS].exists() == true
|
||||
//JMich.BackpackClimb
|
||||
&& ((gGameExternalOptions.sBackpackWeightToClimb == -1) || (INT16)gpSMCurrentMerc->inv[BPACKPOCKPOS].GetWeightOfObjectInStack() + Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].sBackpackWeightModifier > gGameExternalOptions.sBackpackWeightToClimb)
|
||||
&& ((gGameExternalOptions.fUseGlobalBackpackSettings == TRUE) || (Item[gpSMCurrentMerc->inv[BPACKPOCKPOS].usItem].fAllowClimbing == FALSE)))
|
||||
if (!gpSMCurrentMerc->CanClimbWithCurrentBackpack())
|
||||
{
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB]);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user