mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Brief: //dnl ch58
- Fix several problems which lead into bad or no AI decisions, add optional decision of short autofire. Details: - Avoid use of last two locations per turn - Fix problems with improper APs calculations for burst and autofire which lead into AI to forcably cancel and end turn for those actions. - Add option for decide to use short autofire instead of one long to enchance chance to hit. - After taking cover change facing toward closest enemy to avoid going in status red and rather take proper black decisions. - Fix bad public noise processing after AI investigate closest disturbance and find nothing, also erase all same noise points in team members if one of them already investigated. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6310 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+13
-1
@@ -1035,6 +1035,15 @@ INT32 ClosestReachableDisturbance(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK,
|
||||
// if we are there (at the noise gridno)
|
||||
if (sGridNo == pSoldier->sGridNo)
|
||||
{
|
||||
for(uiLoop=0; uiLoop<guiNumMercSlots; uiLoop++)//dnl ch58 160813
|
||||
{
|
||||
pOpp = MercSlots[uiLoop];
|
||||
if(pSoldier->bSide == pOpp->bSide && pSoldier->ubID != pOpp->ubID&& pSoldier->aiData.sNoiseGridno == pOpp->aiData.sNoiseGridno)
|
||||
{
|
||||
pOpp->aiData.sNoiseGridno = NOWHERE;// Erase for all from the same team as it not useful anymore, this will avoid others to check already tested location
|
||||
pOpp->aiData.ubNoiseVolume = 0;
|
||||
}
|
||||
}
|
||||
pSoldier->aiData.sNoiseGridno = NOWHERE; // wipe it out, not useful anymore
|
||||
pSoldier->aiData.ubNoiseVolume = 0;
|
||||
}
|
||||
@@ -1092,7 +1101,10 @@ INT32 ClosestReachableDisturbance(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK,
|
||||
else
|
||||
{
|
||||
// degrade our public noise a bit
|
||||
*pusNoiseGridNo -= 2;
|
||||
//dnl ch58 160813
|
||||
//*pusNoiseGridNo -= 2;
|
||||
if(*pubNoiseVolume > 1)
|
||||
(*pubNoiseVolume)--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user