diff --git a/src/combat.c b/src/combat.c index d1b11491c..9bea62390 100644 --- a/src/combat.c +++ b/src/combat.c @@ -276,19 +276,6 @@ void combFire(WEAPON *psWeap, BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, in return; } - // if target was in range deal with weapon fire - if(baseHitChance > 0) - { - /* note when the weapon fired */ - psWeap->lastFired = gameTime; - - /* reduce ammo if salvo */ - if (psStats->reloadTime) - { - psWeap->ammo--; - } - } - // apply experience accuracy modifiers to the base //hit chance, not to the final hit chance resultHitChance = baseHitChance; @@ -331,6 +318,19 @@ void combFire(WEAPON *psWeap, BASE_OBJECT *psAttacker, BASE_OBJECT *psTarget, in } } + // if target was in range deal with weapon fire + if(baseHitChance > 0) + { + /* note when the weapon fired */ + psWeap->lastFired = gameTime; + + /* reduce ammo if salvo */ + if (psStats->reloadTime) + { + psWeap->ammo--; + } + } + // visibility modifiers //if (psTarget->visible[psAttacker->player] < VIS_ATTACK_MOD_LEVEL) if (psTarget->visible[psAttacker->player] == 0) //not sure if this can ever be > 0 here