[CODE] A little bug in stock 3.0bpl12

From: Ben Shadwick (bshadwic@CLARK.EDU)
Date: 04/20/98


In case anyone is interested (maybe someone else already noticed), I found
a little bug (well, more of an oversight) in the stock 3.0bpl12 code. In
the find_door() function in act.movement.c:

    else {
      send_to_char("I really don't see how you can close anything there.\r\n",
ch);
      return -1;
    }

In case you don't have the code handy, what is going on is: if the player
is in a room with a door, and tries to open/close a door in a different
direction (e.g. the door is on the nort wall, but the player tries 'open
door e'), the above message is send to him/her. Now, the problem with this
is that (for some reason) the above message assumes you are trying to
CLOSE a door, even if you are actually trying to open one. Here is the
solution I came up with:

    else {
      sprintf(buf2,"I really don't see how you can %s anything there.\r\n",
cmdname);
      send_to_char(buf2, ch);
      return -1;
    }

Obviously, it replaces the word "close" with the name of the actual
command used to attempt to manipulate the non-existent door. I've tested
it, and it seems to work perfectly.

.-------------------------------------------------------.
|Ben Shadwick (bshadwicATcsciDOTclarkDOTedu [anti-spam])|
|http://www.geocities.com/SiliconValley/Pines/7376/     |
`-------------------------------------------------------'


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