mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Improved AI RED/YELLOW flanking: - better direction calculation (use direction arrays) - increased search range 4->8 - removed incorrectly calculated AP limit (use CalcActionPoints instead) - additional direction for flank spot searching - prefer desired direction - penalize tiles with no cover from noise location - penalize tiles too far from noise location - don't go into deep water for flanking - skip water tiles (can flank over water tiles only if can cross them in one turn) - min/max flanking range depends on time of day and base sight range - skip buildings when searching for flank spot if not in building already, because soldiers often run into buildings and stop flanking - use RUNNING movement mode for flanking instead of default SWATTING - only CUNNINGSOLO and CUNNINGAID soldiers flank - don't start flanking when no friends between soldier and noise gridno (in 3 directions) - stop flanking when no friends between soldier and noise gridno (in 3 directions) - stop flanking and reset flank counter in BLACK state - avoid map edges when flanking - disable flanking for soldiers with limited roaming range (STATIONARY/ONGUARD/CLOSEPATROL/SNIPER) In general, AI flanking is much more effective now (it never fully worked previously, especially in turnbased). git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8003 3b4a5df2-a311-0410-b5c6-a8a6f20db521