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:
@@ -190,7 +190,6 @@ typedef enum
|
||||
|
||||
INT16 AdvanceToFiringRange( SOLDIERTYPE * pSoldier, INT16 sClosestOpponent );
|
||||
|
||||
BOOLEAN AimingGun(SOLDIERTYPE *pSoldier);
|
||||
void CalcBestShot(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestShot);
|
||||
void CalcBestStab(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestStab, BOOLEAN fBladeAttack);
|
||||
void CalcBestThrow(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow);
|
||||
@@ -223,7 +222,6 @@ INT8 ArmedVehicleDecideAction( SOLDIERTYPE* pSoldier );
|
||||
// a variant of ClosestSeenOpponent(...), that allows to find enemies on a roof
|
||||
INT32 ClosestSeenOpponentWithRoof(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLevel);
|
||||
|
||||
INT8 CrowDecideAction( SOLDIERTYPE * pSoldier );
|
||||
void DecideAlertStatus( SOLDIERTYPE *pSoldier );
|
||||
INT8 DecideAutoBandage( SOLDIERTYPE * pSoldier );
|
||||
UINT16 DetermineMovementMode( SOLDIERTYPE * pSoldier, INT8 bAction );
|
||||
|
||||
@@ -408,10 +408,6 @@ BOOLEAN InitAI( void )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN AimingGun(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
void HandleSoldierAI( SOLDIERTYPE *pSoldier ) // FIXME - this function is named inappropriately
|
||||
{
|
||||
|
||||
@@ -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