From b76e9cca86c895f9a45874e18f2458418961a165 Mon Sep 17 00:00:00 2001 From: Wanne Date: Tue, 26 Nov 2013 16:59:08 +0000 Subject: [PATCH] - Corrected Bugfix from Revision 6654 (thx to Sevenfm) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6655 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/World Items.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tactical/World Items.cpp b/Tactical/World Items.cpp index 62ec10c62..76e9fd536 100644 --- a/Tactical/World Items.cpp +++ b/Tactical/World Items.cpp @@ -468,6 +468,10 @@ INT32 AddItemToWorld( INT32 sGridNo, OBJECTTYPE *pObject, UINT8 ubLevel, UINT16 // Flugente: we can arm bombs in our inventory and then throw them out, which will cause them to be added to the world. Only way to identify those items is via a check for their bDetonatorType if (usFlags & WORLD_ITEM_ARMED_BOMB || ( (Item[pObject->usItem].usItemClass & (IC_BOMB)) && ( ( (*pObject)[0]->data.misc.bDetonatorType == BOMB_TIMED ) || ( (*pObject)[0]->data.misc.bDetonatorType == BOMB_REMOTE ) ) ) ) { + // sevenfm: added flag WORLD_ITEM_ARMED_BOMB + // this fixes bug with remote explosives not being removed after activation, if they were armed in inventory and thrown afterwards + gWorldItems[ iItemIndex ].usFlags |= WORLD_ITEM_ARMED_BOMB; + iReturn = AddBombToWorld( iItemIndex ); if (iReturn == -1) { @@ -488,10 +492,7 @@ INT32 AddItemToWorld( INT32 sGridNo, OBJECTTYPE *pObject, UINT8 ubLevel, UINT16 pSoldier = MercPtrs[ soldierID ]; } } - // sevenfm: added flag WORLD_ITEM_ARMED_BOMB - // this fixes bug with remote explosives not being removed after activation, if they were armed in inventory and thrown afterwards - gWorldItems[ iItemIndex ].usFlags |= WORLD_ITEM_ARMED_BOMB; - + if (pSoldier != NULL) { // if soldier is on our team, or is AI and we are the server