mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Prevent endless clock (#186)
Stop AI from attempting to steal a weapon that has a sling attachment, which prevents stealing. (by Seven)
This commit is contained in:
@@ -3308,6 +3308,10 @@ BOOLEAN AIDetermineStealingWeaponAttempt( SOLDIERTYPE * pSoldier, SOLDIERTYPE *
|
|||||||
UINT16 dfgvdfv = Item[pOpponent->inv[HANDPOS].usItem].usItemClass;
|
UINT16 dfgvdfv = Item[pOpponent->inv[HANDPOS].usItem].usItemClass;
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
if (HasAttachmentOfClass(&(pOpponent->inv[HANDPOS]), AC_SLING))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
uiSuccessChance = CalcChanceToSteal(pSoldier, pOpponent, 0);
|
uiSuccessChance = CalcChanceToSteal(pSoldier, pOpponent, 0);
|
||||||
if ( uiSuccessChance >= 100 )
|
if ( uiSuccessChance >= 100 )
|
||||||
|
|||||||
Reference in New Issue
Block a user