mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: incorrect cursor when using wire cutters (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8978 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4794,6 +4794,13 @@ BOOLEAN UIMouseOnValidAttackLocation( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
else if (IsStructureDeconstructItem(pSoldier->inv[HANDPOS].usItem, usMapPos, pSoldier))
|
||||
{
|
||||
if (FindStructure(usMapPos, (STRUCTURE_GENERIC | STRUCTURE_WIREFENCE)))
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
// Flugente: if there is tripwire here that we know of, allow handling
|
||||
else if ( FindWorldItemForTripwireInGridNo( usMapPos, pSoldier->pathing.bLevel, TRUE ) != -1 )
|
||||
{
|
||||
|
||||
+10
-2
@@ -2077,7 +2077,13 @@ UINT8 HandleWirecutterCursor( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT32 uiCur
|
||||
{
|
||||
return( GOOD_WIRECUTTER_UICURSOR );
|
||||
}
|
||||
|
||||
else if (IsStructureDeconstructItem(pSoldier->inv[HANDPOS].usItem, sGridNo, pSoldier))
|
||||
{
|
||||
if (FindStructure(sGridNo, (STRUCTURE_GENERIC | STRUCTURE_WIREFENCE)))
|
||||
{
|
||||
return(GOOD_WIRECUTTER_UICURSOR);
|
||||
}
|
||||
}
|
||||
return( BAD_WIRECUTTER_UICURSOR );
|
||||
}
|
||||
|
||||
@@ -2898,8 +2904,10 @@ UINT8 GetActionModeCursor( SOLDIERTYPE *pSoldier )
|
||||
|
||||
// Flugente: cursor for constructing/deconstructing
|
||||
// at the moment the gridno is not required in these functions, thus 1 suffices
|
||||
if ( IsStructureConstructItem( usInHand, 1, pSoldier ) || IsStructureDeconstructItem( usInHand, 1, pSoldier ) )
|
||||
if (!Item[usInHand].wirecutters && (IsStructureConstructItem(usInHand, 1, pSoldier) || IsStructureDeconstructItem(usInHand, 1, pSoldier)))
|
||||
{
|
||||
ubCursor = FORTICURS;
|
||||
}
|
||||
|
||||
// Flugente: cursor for handcuffs
|
||||
if ( gGameExternalOptions.fAllowPrisonerSystem && HasItemFlag(usInHand, HANDCUFFS) )
|
||||
|
||||
Reference in New Issue
Block a user