Difference for server/c_object.c from version 1.85 to 1.86


version 1.85 version 1.86
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_object_c =   * static char *rcsid_c_object_c =
  *   "$Id: c_object.c,v 1.85 2006/08/12 12:00:31 gros Exp $";   *   "$Id: c_object.c,v 1.86 2006/08/12 12:23:30 gros Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 733
 
Line 733
 int command_take (object *op, char *params)  int command_take (object *op, char *params)
 {  {
     object *tmp, *next;      object *tmp, *next;
       int ival;
       int missed = 0;
   
     if (op->container)       if (op->container)
  tmp=op->container->inv;   tmp=op->container->inv;
Line 764
 
Line 766
  * but that probably will make it more difficult to read, and   * but that probably will make it more difficult to read, and
  * not make it any more efficient   * not make it any more efficient
  */   */
  if (params && item_matched_string(op, tmp, params)) {          if (params && (ival=item_matched_string(op, tmp, params))>0) {
               if ((ival<=2)&&(!can_pick(op,tmp)))
               {
                   if(!QUERY_FLAG(tmp, FLAG_IS_FLOOR))/* don't count floor tiles */
                       missed++;
               }
               else
      pick_up(op, tmp);       pick_up(op, tmp);
  }   }
  else if (can_pick(op, tmp) && !params) {   else if (can_pick(op, tmp) && !params) {
Line 788
 
Line 796
      }       }
  if (!tmp) new_draw_info(NDI_UNIQUE, 0,op, "There is nothing to pick up.");   if (!tmp) new_draw_info(NDI_UNIQUE, 0,op, "There is nothing to pick up.");
     }      }
       if (missed==1)
           new_draw_info(NDI_UNIQUE, 0, op, "You were unable to take one of the items.");
       else if (missed>1)
           new_draw_info_format(NDI_UNIQUE, 0, op,
               "You were unable to take %d of the items.",missed);
     return 0;      return 0;
 }  }
   


Legend:
line(s) removed in v.1.85 
line(s) changed
 line(s) added in v.1.86

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:27