Re: [ Code ] My previous post...

From: Chris Proctor (cjp@YOYO.CC.MONASH.EDU.AU)
Date: 07/30/97


> This is the line in question:
>
>   if (((SECT(IN_ROOM(ch)) == SECT_FLYING)) && (!AFF_FLAGGED(ch, AFF_FLY)) &&
>      !(IS_NPC(ch) && MOB_FLAGGED(ch, MOB_WINGS)) &&
>      !(IS_NPC(ch) && MOB_FLAGGED(ch, MOB_NOACT)) &&
>      !(GET_LEVEL(ch) > LVL_IMMORT)) {
>
>        if (FIGHTING(ch)) {
>          stop_fighting(ch);
>          stop_fighting(FIGHTING(ch));
>        }

It seems to me that the problem here is that you have stop_fighting(ch)
BEFORE stop_fighting(FIGHTING(ch)).

i.e. when you try to stop their opponent fighting it doesn't work,
because their opponent is no longer stored in FIGHTING(ch).

The way I got around it was having a:

struct char_data *fighting;

fighting = FIGHTING(ch); // somewhere before you stop the char fighting,
and before you kill them

stop_fighting(fighting); // instead of stop_fighting(FIGHTING(ch))

Hope that does it for you.

Chris.

_____________________________________________________
      "A double-edged sword lets you cut down
      your enemies with the backswing as well."
             -- Gerrard of the Weatherlight
-----------------------------------------------------
     Check out Dominia Mud, on snafu.net.au 3333
  Or my homepage: http://yoyo.cc.monash.edu.au/~cjp


     +------------------------------------------------------------+
     | 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/08/00 PST