From 7e7c27b61d55d77cb10ee86f69c4ed764a20ec1f Mon Sep 17 00:00:00 2001 From: ChrisL Date: Tue, 6 Jan 2009 17:14:43 +0000 Subject: [PATCH] Bugfix: Removed the ability to manually jump fences while wearing a backpack. Bugfix: Force shopkeepers to drop LBENODE items to the ground instead of trying to return them to the soldier during a sale. This keeps items in the LBENODE from being lost. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2472 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/ShopKeeper Interface.cpp | 7 +++++++ Tactical/Turn Based Input.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/Tactical/ShopKeeper Interface.cpp b/Tactical/ShopKeeper Interface.cpp index c1ddb3fb1..13f19f5af 100644 --- a/Tactical/ShopKeeper Interface.cpp +++ b/Tactical/ShopKeeper Interface.cpp @@ -7125,6 +7125,13 @@ void ReturnItemToPlayerSomehow( INVENTORY_IN_SLOT *pInvSlot, SOLDIERTYPE *pDropS ShopkeeperAddItemToPool( pDropSoldier->sGridNo, &pInvSlot->ItemObject, VISIBLE, pDropSoldier->pathing.bLevel, 0, 0 ); } } + //CHRISL: We need to handle LBENODE items a little differently so we don't lose anything stored in them. Instead of + // trying to return the item, simply drop the item to the ground. + if(UsingNewInventorySystem() == true && pInvSlot->ItemObject.IsActiveLBE(0) == true) + { + pDropSoldier->inv[pInvSlot->bSlotIdInOtherLocation].initialize(); + ShopkeeperAddItemToPool( pDropSoldier->sGridNo, &pInvSlot->ItemObject, VISIBLE, pDropSoldier->pathing.bLevel, 0, 0 ); + } } diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index b655dcdca..3ec66ad68 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -2540,6 +2540,10 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) SOLDIERTYPE *pjSoldier; if ( GetSoldier( &pjSoldier, gusSelectedSoldier ) ) { + // CHRISL: Turn off manual jumping while wearing a backpack + if(UsingNewInventorySystem() == true && pjSoldier->inv[BPACKPOCKPOS].exists() == true) + break; + BOOLEAN fNearHeigherLevel; BOOLEAN fNearLowerLevel; INT8 bDirection;