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:
Asdow
2023-08-18 21:05:11 +03:00
parent 1c4929c3e1
commit 613de1b869
3 changed files with 3 additions and 9 deletions
+3 -3
View File
@@ -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)