mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user