Bug in the attack/fire code?

Hans Ronne hronne@pp.sbbs.se
Tue Aug 6 19:23:00 GMT 2002


>> 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




More information about the Xconq7 mailing list