Patch #4

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


Original report:
--- 8< --- 8< ---
From: ejg3@cornell.edu (Eric Green)

If you are fighting a mob which flees, you can still bash or kick it until
the next pulse_violence rolls around, even though its in another room.
You can fix this by adding a check (IN_ROOM(FIGHTING(ch)) == IN_ROOM(ch))
before setting vict to FIGHTING(ch).
--- 8< --- 8< ---

The IN_ROOM() problem is fixed by:

diff -upr stk/act.offensive.c 171/act.offensive.c
--- stk/act.offensive.c Sat Jun  6 16:00:59 1998
+++ 171/act.offensive.c Sat Jun  6 18:34:06 1998
@@ -288,7 +288,7 @@ ACMD(do_bash)
     return;
   }
   if (!(vict = get_char_room_vis(ch, arg))) {
-    if (FIGHTING(ch)) {
+    if (FIGHTING(ch) && IN_ROOM(ch) == IN_ROOM(FIGHTING(ch))) {
       vict = FIGHTING(ch);
     } else {
       send_to_char("Bash who?\r\n", ch);
@@ -314,6 +314,9 @@ ACMD(do_bash)
     GET_POS(ch) = POS_SITTING;
   } else {
     damage(ch, vict, 1, SKILL_BASH);
+    /*
+     * There's a bug in the two lines below.  We could fail bash and they sit.
+     */
     GET_POS(vict) = POS_SITTING;
     WAIT_STATE(vict, PULSE_VIOLENCE);
   }

Should that be "Bash who?" or "Bash whom?"

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