Brief: //dnl ch61

- Basic support for reducing AI friendly fire.
Details:
- Friendly fire grids are defined during best shot calculation then AI decide depending of soldier character to fire or take other action. Still in autofire accidentally friendly hits could be higher depending of bullets spreading.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-08-25 07:36:03 +00:00
parent 4ac9cf5ebe
commit f06df7741f
4 changed files with 107 additions and 2 deletions
+3
View File
@@ -51,6 +51,7 @@
#include "soldier tile.h" // added by Flugente
#include "Sound Control.h" // added by Flugente
#include "Soldier Functions.h" // added by Flugente for DoesSoldierWearGasMask(...)
#include "AIInternals.h"//dnl ch61 180813
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
@@ -3418,6 +3419,7 @@ UINT8 CalcChanceToGetThrough( BULLET * pBullet )
guiLocalStructureCTH[iNumLocalStructures] = 100;
gubLocalStructureNumTimesHit[iNumLocalStructures] = 0;
iNumLocalStructures++;
gUnderFire.Add(pStructure->usStructureID, 100);//dnl ch61 241009
}
else
{
@@ -3426,6 +3428,7 @@ UINT8 CalcChanceToGetThrough( BULLET * pBullet )
guiLocalStructureCTH[iNumLocalStructures] = MIN_CHANCE_TO_ACCIDENTALLY_HIT_SOMEONE;
gubLocalStructureNumTimesHit[iNumLocalStructures] = 0;
iNumLocalStructures++;
gUnderFire.Add(pStructure->usStructureID, MIN_CHANCE_TO_ACCIDENTALLY_HIT_SOMEONE);//dnl ch61 241009
}
}
}