Re: Random Aggression

From: George (greerga@CIRCLEMUD.ORG)
Date: 06/25/98


On Thu, 25 Jun 1998, Chuck Reed wrote:

>int can_hit(struct char_data *ch, struct char_data *vict)
>{
[...]
>   if (vict->in_room == ch->in_room)
>      return 0;

I think you mean '!=' here.

>Now, I'm guessing the aggression code nulls the vict pointer up half the
>time, but it is re-defined on line 227.  Any ideas on what the heck could
>be happening?

Looks like you have a loop within a loop where someone could die in the
inner loop.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/          | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST