diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 6e3a7e34..dffb0eb6 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -2742,7 +2742,7 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN INT32 sTargetGridNo; INT8 bTargetLevel; UINT16 usItem; - LEVELNODE* pIntNode; + LEVELNODE* pIntNode = NULL; STRUCTURE* pStructure; INT32 sGridNo, sNewGridNo; UINT8 ubItemCursor; @@ -2767,9 +2767,6 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN } } - // ATE: Check if we are targeting an interactive tile, and adjust gridno accordingly... - pIntNode = GetCurInteractiveTileGridNoAndStructure( &sGridNo, &pStructure ); - if ( pTargetSoldier != NULL ) { sTargetGridNo = pTargetSoldier->sGridNo; @@ -2777,6 +2774,9 @@ void UIHandleMercAttack( SOLDIERTYPE *pSoldier , SOLDIERTYPE *pTargetSoldier, IN } else { + // ATE: Check if we are targeting an interactive tile, and adjust gridno accordingly... + pIntNode = GetCurInteractiveTileGridNoAndStructure(&sGridNo, &pStructure); + sTargetGridNo = usMapPos; bTargetLevel = (INT8)gsInterfaceLevel; diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index b3dba983..4b5d6990 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -6101,7 +6101,7 @@ attachmentList ReInitMergedItem(SOLDIERTYPE* pSoldier, OBJECTTYPE* pObj, UINT16 if(Item[Item[pObj->usItem].defaultattachments[cnt]].inseparable == 1){ OBJECTTYPE defaultAttachment; CreateItem(Item [ pObj->usItem ].defaultattachments[cnt],(*pObj)[ubStatusIndex]->data.objectStatus,&defaultAttachment); - AssertMsg(pObj->AttachObject(NULL,&defaultAttachment, FALSE, ubStatusIndex, -1, FALSE), "A default attachment could not be attached after merging, this should not be possible."); + AssertMsg(pObj->AttachObject(NULL, &defaultAttachment, FALSE, ubStatusIndex, -1, FALSE), String("A default attachment could not be attached after merging, this should not be possible. item %d attachment %d", pObj->usItem, defaultAttachment.usItem)); } }