Fix for AI opponent finding

AI will now ignore empty player vehicles and instead look for real threats.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6863 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2014-01-31 09:07:04 +00:00
parent 4c5e98c801
commit bf451b0697
+13
View File
@@ -23,6 +23,7 @@
#include "lighting.h"
#include "Soldier Create.h"
#include "SkillCheck.h" // added by SANDRO
#include "Vehicles.h" // added by silversurfer
#endif
//////////////////////////////////////////////////////////////////////////////
@@ -1162,6 +1163,10 @@ INT32 ClosestKnownOpponent(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLev
continue; // next merc
}
// silversurfer: ignore empty vehicles
if ( pOpp->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpp->bVehicleID ) == 0 )
continue;
// Special stuff for Carmen the bounty hunter
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpp->ubProfile != SLAY)
{
@@ -1265,6 +1270,10 @@ INT32 ClosestSeenOpponent(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8 * pbLeve
continue; // next merc
}
// silversurfer: ignore empty vehicles
if ( pOpp->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpp->bVehicleID ) == 0 )
continue;
// Special stuff for Carmen the bounty hunter
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpp->ubProfile != SLAY)
{
@@ -1357,6 +1366,10 @@ INT32 ClosestSeenOpponentWithRoof(SOLDIERTYPE *pSoldier, INT32 * psGridNo, INT8
continue; // next merc
}
// silversurfer: ignore empty vehicles
if ( pOpp->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpp->bVehicleID ) == 0 )
continue;
// Special stuff for Carmen the bounty hunter
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpp->ubProfile != SLAY)
{