fastaggr

From: I Chose No Name (MUDaholic@AOL.COM)
Date: 08/05/98


Okay, sorry to post about this again...a lot of people responded to my
previous post, but i still don't know what to do :) I'll post the code again,
and i don't mean to say "give me code"...but...well, basically...i guess i am
saying that :) heh, i don't have a clue what to do :~(
Here's the code:
---
ACMD(do_move)
{
  register struct char_data *vict, *tmob;
  int found;

  /*
   * This is basically a mapping of cmd numbers to perform_move indices.
   * It cannot be done in perform_move because perform_move is called
   * by other functions which do not require the remapping.
   */
  perform_move(ch, cmd - 1, 0);

  for (tmob = world[ch->in_room].people; tmob; tmob = tmob->next_in_room) {
    if (!IS_NPC(tmob) || !MOB_FLAGGED(tmob, MOB_FAST_AGGR))
      continue;

    found = FALSE;
    for (vict = world[tmob->in_room].people; vict && !found; vict =
vict->next_in_room) {
      if (IS_NPC(vict) || !CAN_SEE(tmob, vict) || PRF_FLAGGED(vict,
PRF_NOHASSLE))
        continue;
      if (MOB_FLAGGED(tmob, MOB_WIMPY) && AWAKE(vict))
        continue;
      if (MOB_FLAGGED(tmob, MOB_AGGRESSIVE) ||
         (MOB_FLAGGED(tmob, MOB_AGGR_EVIL) && IS_EVIL(vict)) ||
         (MOB_FLAGGED(tmob, MOB_AGGR_NEUTRAL) && IS_NEUTRAL(vict)) ||
         (MOB_FLAGGED(tmob, MOB_AGGR_GOOD) && IS_GOOD(vict))) {
         hit(tmob, vict, TYPE_UNDEFINED);
         found = TRUE;
         }
    }
  }
}
---
and again, the prob is that it's trying to do stuff to ch after ch is dead,
which obviously doesn't work :~( i'd appreciate it if someone could just email
me and not the list, as i don't want to spam it...also, you can flame me for
my incompetence to code perfectly in C and my asking for help, but again, send
it to me personally...please help me :) thanks a lot


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