Fix: UI attack handling prioritised interactive structures over target soldiers even if target soldier was explicitly provided causing deadlocks e.g. when trying to punch enemy overlapped by a door (by anv).

ReInitMergedItem: show item id, attachment id when doing assert.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8935 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-02-13 05:48:17 +00:00
parent 169e909b56
commit 0ccecc472c
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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));
}
}