Re: [CODE] Question about LordKaT's dual-wield patch.

From: Chris Gilbert (
Date: 10/01/00

On Sun, 01 Oct 2000, you wrote:

note that this is unrelated to the question, but just something I spotted

> He has the following code at the end of the hit function, to call the
> double_hit stuff:
>         else {
>                 damage(ch, victim, dam, w_type);
>                 if (GET_EQ(ch, WEAR_DWIELD) && GET_HIT(victim) > 0)
>                         double_hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
>         }

It's worth noting that if you're using bpl 14 (or higher) you want a check on
the return value of damage.  If you don't there's the possibility that victim
may no long be valid, check fight.c for the return codes.  If you don't you
may crash when you dereference victim...


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT