Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: patch: now tells you when a door has no lock when lockpicking




On a couple of occasions I've spent a good 60 seconds trying to
lockpick a door which had no lock to begin with (got the "you failed
to pick...").

Apply to server/skills.c, v 0.95.1:

*** skills.c.orig	Sun Dec  6 03:03:31 1998
--- skills.c	Sun Dec  6 03:01:39 1998
***************
*** 276,285 ****
        if(!tmp) continue;
        switch(tmp->type) { 
          case DOOR:
!             if (attempt_pick_lock(tmp, pl)) { 
  		success = 1;
                  sprintf(buf, "you pick the lock.");
!             } else 
                  sprintf(buf, "you fail to pick the lock.");
  	    break;
          case LOCKED_DOOR: 
--- 276,287 ----
        if(!tmp) continue;
        switch(tmp->type) { 
          case DOOR:
! 	    if (!QUERY_FLAG(tmp, FLAG_NO_PASS))
! 	      sprintf(buf, "this door has no lock");
! 	    else if (attempt_pick_lock(tmp, pl)) { 
  		success = 1;
                  sprintf(buf, "you pick the lock.");
!             } else
                  sprintf(buf, "you fail to pick the lock.");
  	    break;
          case LOCKED_DOOR: 

-- 
...the Linux philosophy is "laugh in the                 Maciej Kalisiak
face of danger". Oops. Wrong one. "Do it             mac@dgp.utoronto.ca
yourself". That's it. -- Linus                     mac@elecom97.mail.net
                                               www.eecg.utoronto.ca/~mac