Did I say vtolHappy was somewhat error prone?

* Fix a bug in r5409 where I accidentily reversed the weapon-reloaded logic
 * Merge two nested if-statements


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5410 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-07 12:58:18 +00:00
parent 81c8aa657c
commit 01108419db
1 changed files with 3 additions and 5 deletions

View File

@ -4591,14 +4591,12 @@ BOOL vtolHappy(const DROID* psDroid)
for (i = 0; i < psDroid->numWeaps; ++i)
{
if (asWeaponStats[psDroid->asWeaps[i].nStat].vtolAttackRuns > 0)
{
if (psDroid->sMove.iAttackRuns[i] == 0)
if (asWeaponStats[psDroid->asWeaps[i].nStat].vtolAttackRuns > 0
&& psDroid->sMove.iAttackRuns[i] != 0)
{
return false;
}
}
}
return true;
}