mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- new option: ENEMY_JAMS in [Tactical Gameplay Settings] allows enemy gun jams
- take into account unjam AP cost for jammed weapon - improved AI_BETTER_COVER option git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8409 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2533,6 +2533,16 @@ INT16 MinAPsToShootOrStab(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 bAimTime,
|
||||
else
|
||||
bAPCost += APBPConstants[AP_CHANGE_TARGET];
|
||||
}
|
||||
|
||||
// sevenfm: add unjam AP cost
|
||||
if( Item[usUBItem].usItemClass == IC_GUN &&
|
||||
!EXPLOSIVE_GUN( usUBItem ) &&
|
||||
!(pSoldier->bWeaponMode == WM_ATTACHED_GL || pSoldier->bWeaponMode == WM_ATTACHED_GL_BURST || pSoldier->bWeaponMode == WM_ATTACHED_GL_AUTO) &&
|
||||
(*pObjUsed)[0]->data.gun.bGunAmmoStatus < 0)
|
||||
{
|
||||
bAPCost += APBPConstants[AP_UNJAM];
|
||||
}
|
||||
|
||||
#if 0//dnl ch63 240813 this seems very wrong, in most case (pSoldier->bActionPoints > bFullAps) and this will return less points then is actually required and could cancel some AI actions, like throwing grenades
|
||||
// the minimum AP cost of ANY shot can NEVER be more than merc's maximum APs!
|
||||
if ( bAPCost > bFullAPs )
|
||||
|
||||
Reference in New Issue
Block a user