From ee9dd1108aae5f2b840a2a869fcf5d5a7b13f2c9 Mon Sep 17 00:00:00 2001 From: Roman C Date: Wed, 2 Jan 2008 21:32:14 +0000 Subject: [PATCH] Fixed bug #10443. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3319 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/combat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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