mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10: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:
@@ -1311,6 +1311,11 @@ INT32 FindSpotMaxDistFromOpponents(SOLDIERTYPE *pSoldier)
|
||||
// Turn off the "reachable" flag for his current location
|
||||
// so we don't consider it
|
||||
gpWorldLevelData[pSoldier->sGridNo].uiFlags &= ~(MAPELEMENT_REACHABLE);
|
||||
//dnl ch58 170813 also don't use last two locations to avoid looping same decisions per turn
|
||||
if(!TileIsOutOfBounds(pSoldier->sLastTwoLocations[0]))
|
||||
gpWorldLevelData[pSoldier->sLastTwoLocations[0]].uiFlags &= ~(MAPELEMENT_REACHABLE);
|
||||
else if(!TileIsOutOfBounds(pSoldier->sLastTwoLocations[1]))
|
||||
gpWorldLevelData[pSoldier->sLastTwoLocations[1]].uiFlags &= ~(MAPELEMENT_REACHABLE);
|
||||
|
||||
for (sYOffset = -sMaxUp; sYOffset <= sMaxDown; sYOffset++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user