mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Brief: //dnl ch70
- Some APs fixing for throwing knives and backpack, with doing some correction to my previous changes. Details: - Do some correction and missing parts to ch58 and ch69. - Throwing knives will add you bonus for throwing knives to same target as was suppose from v1.12 but never works. - Fix AI use gun calculation for throwing knives instead for throw. - Fix incorrect showing and deducting APs when try to shoot from prone with backpack or throw from prone and crouch positions with turning in general. - Fix cheating when sLastTarget is set just for raise gun in that direction, this was always done after you fire. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6409 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -8791,18 +8791,21 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTime,
|
||||
UINT32 AICalcChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTime, UINT8 ubAimPos, INT8 bTargetLevel, UINT16 usAnimState)//dnl ch59 180813
|
||||
{
|
||||
INT8 bTrueLevel;//dnl ch59 180813 if target is above ground CalcChanceToHitGun will return 0 because pSoldier->bTargetLevel contains some old values from previous target which was on ground level
|
||||
UINT16 usTrueState;
|
||||
UINT32 uiChance;
|
||||
UINT16 usTrueState;
|
||||
UINT32 uiChance;
|
||||
|
||||
// same as CCTHG but fakes the attacker always standing
|
||||
usTrueState = pSoldier->usAnimState;
|
||||
bTrueLevel = pSoldier->bTargetLevel;
|
||||
pSoldier->bTargetLevel = bTargetLevel;
|
||||
pSoldier->usAnimState = usAnimState;
|
||||
uiChance = CalcChanceToHitGun( pSoldier, sGridNo, ubAimTime, ubAimPos );
|
||||
if(Item[pSoldier->usAttackingWeapon].usItemClass & IC_THROWING_KNIFE)//dnl ch70 160913
|
||||
uiChance = CalcThrownChanceToHit(pSoldier, sGridNo, ubAimTime, ubAimPos);
|
||||
else
|
||||
uiChance = CalcChanceToHitGun(pSoldier, sGridNo, ubAimTime, ubAimPos);
|
||||
pSoldier->usAnimState = usTrueState;
|
||||
pSoldier->bTargetLevel = bTrueLevel;
|
||||
if(UsingNewCTHSystem() == true)
|
||||
if(UsingNewCTHSystem() == true && !(Item[pSoldier->usAttackingWeapon].usItemClass & IC_THROWING_KNIFE))//dnl ch70 160913
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// HEADROCK HAM 4: NCTH calculation
|
||||
|
||||
Reference in New Issue
Block a user