Brief: //dnl ch69

- Add alternative fix for CalcBestShot which should remove existing APs problems maybe even create AI deadlier then ever ;-)
Details:
- Existing CalcBestShot simply became inadequate and buggier for so many add ons to game, so compiling with dnlCALCBESTSHOT is alternative option which calculate all turning, stance and raising gun cost for different stances and all available scopes, and after all hoping fix incorrect APs calculation as well, hitrate formula is adapt to 100AP system, also try to optimize a bit to get less AICalcChanceToHitGun calls and to use with different stance decisions.
- From ch58 aiming for burst and autofire was disabled as was causing invalid action handle due to incorrect APs calculation so from now aiming AI also use aiming before bursting.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6403 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-09-15 15:59:51 +00:00
parent 2e4a12173a
commit d24b54cb5a
7 changed files with 291 additions and 89 deletions
+6 -8
View File
@@ -2353,16 +2353,14 @@ void CheckForChangingOrders(SOLDIERTYPE *pSoldier)
}
}
void InitAttackType(ATTACKTYPE *pAttack)
void ATTACKTYPE::InitAttackType(ATTACKTYPE *pAttack)//dnl ch69 140913
{
// initialize the given bestAttack structure fields to their default values
pAttack->ubPossible = FALSE;
pAttack->ubOpponent = NOBODY;
pAttack->ubAimTime = 0;
pAttack->ubChanceToReallyHit = 0;
pAttack->sTarget = NOWHERE;
pAttack->iAttackValue = 0;
pAttack->ubAPCost = 0;
memset(pAttack, 0, sizeof(ATTACKTYPE));
pAttack->ubOpponent = NOBODY;
pAttack->sTarget = NOWHERE;
pAttack->bWeaponIn = NO_SLOT;
pAttack->ubStance = STANDING;
}
void HandleInitialRedAlert( INT8 bTeam, UINT8 ubCommunicate)