This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: Bug in the attack/fire code?
>> if (reason && rslt == A_ANY_NO_AMMO)
>> *reason = (HistEventType)rslt;
>> rslt = check_fire_at_action(unit, unit, other, -1);
>> if (valid(rslt)) {
>> net_prep_fire_at_action(unit, unit, other, -1);
>> return TRUE;
>> }
>
>Shouldn't there be some "else" statements in there to prevent more than
>one possible course of action being chosen?
No. Notice the "return" after each net_prep action. This ensures that only
one of them (the first to pass the check) is executed.
Hans
Hans Ronne
hronne@pp.sbbs.se