mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix: no bullet when not targetting a soldier
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5992 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -259,8 +259,6 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
||||
// We test for every 'pure' drug separately
|
||||
for (cnt = DRUG_TYPE_ADRENALINE; cnt < DRUG_TYPE_MAX; ++cnt)
|
||||
{
|
||||
UINT32 drugtestflag = (1 << cnt); // comparing with this flag will determine the drug
|
||||
|
||||
// omit DRUG_TYPE_REGENERATION, because that is checked afterwards separately
|
||||
if ( cnt == DRUG_TYPE_REGENERATION )
|
||||
continue;
|
||||
|
||||
+10
-2
@@ -4990,7 +4990,11 @@ UINT32 CalcNewChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTi
|
||||
}
|
||||
|
||||
// Flugente: moved trait modifiers into a member function
|
||||
iTraitModifier = pSoldier->GetTraitCTHModifier( usInHand, ubAimTime, pTarget->ubProfile );
|
||||
UINT8 targetprofile = NOBODY;
|
||||
if ( pTarget && pTarget->ubProfile != NOBODY )
|
||||
targetprofile = pTarget->ubProfile;
|
||||
|
||||
iTraitModifier = pSoldier->GetTraitCTHModifier( usInHand, ubAimTime, targetprofile );
|
||||
|
||||
// SHOOTING AT SAME TARGET AGAIN
|
||||
if (sGridNo == pSoldier->sLastTarget )
|
||||
@@ -6459,7 +6463,11 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTime,
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modify for traits
|
||||
// Flugente: moved trait modifiers into a member function
|
||||
iChance += pSoldier->GetTraitCTHModifier( usInHand, ubAimTime, pTarget->ubProfile );
|
||||
UINT8 targetprofile = NOBODY;
|
||||
if ( pTarget && pTarget->ubProfile != NOBODY )
|
||||
targetprofile = pTarget->ubProfile;
|
||||
|
||||
iChance += pSoldier->GetTraitCTHModifier( usInHand, ubAimTime, targetprofile );
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user