mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Remove useless code
!AimingGun(pSoldier) would always evaluate to true and there are no hits to CrowDecideAction in the entire solution even in commented out code
This commit is contained in:
@@ -7086,7 +7086,7 @@ L_NEWAIM:
|
||||
{
|
||||
// we might want to turn before lying down!
|
||||
if ( (!gfTurnBasedAI || GetAPsToLook( pSoldier ) <= pSoldier->bActionPoints - GetAPsToChangeStance( pSoldier, (INT8) pSoldier->aiData.usActionData )) &&
|
||||
(((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) && !AimingGun(pSoldier)) )
|
||||
((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) )
|
||||
{
|
||||
// if we have a closest seen opponent
|
||||
if (!TileIsOutOfBounds(sClosestOpponent))
|
||||
@@ -7140,7 +7140,7 @@ L_NEWAIM:
|
||||
// hopeless guys shouldn't waste their time this way, UNLESS they CAN move
|
||||
// but chose not to to get this far (which probably means they're cornered)
|
||||
// ALSO, don't bother turning if we're already aiming a gun
|
||||
if ( !gfHiddenInterrupt && ((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) && !AimingGun(pSoldier))
|
||||
if ( !gfHiddenInterrupt && ((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) )
|
||||
{
|
||||
// determine the location of the known closest opponent
|
||||
// (don't care if he's conscious, don't care if he's reachable at all)
|
||||
@@ -10297,7 +10297,7 @@ INT8 ArmedVehicleDecideActionBlack( SOLDIERTYPE *pSoldier )
|
||||
// hopeless guys shouldn't waste their time this way, UNLESS they CAN move
|
||||
// but chose not to to get this far (which probably means they're cornered)
|
||||
// ALSO, don't bother turning if we're already aiming a gun
|
||||
if ( !gfHiddenInterrupt && ((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) && !AimingGun( pSoldier ) )
|
||||
if ( !gfHiddenInterrupt && ((pSoldier->aiData.bAIMorale > MORALE_HOPELESS) || ubCanMove) )
|
||||
{
|
||||
// determine the location of the known closest opponent
|
||||
// (don't care if he's conscious, don't care if he's reachable at all)
|
||||
|
||||
Reference in New Issue
Block a user