Difference for server/apply.c from version 1.119 to 1.120


version 1.119 version 1.120
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.119 2005/04/15 20:56:38 ryo_saeba Exp $";   *   "$Id: apply.c,v 1.120 2005/04/27 06:25:15 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 759
 
Line 759
 #define CONV_NR(xyz) (unsigned char) xyz->stats.sp  #define CONV_NR(xyz) (unsigned char) xyz->stats.sp
 #define CONV_NEED(xyz) (unsigned long) xyz->stats.food  #define CONV_NEED(xyz) (unsigned long) xyz->stats.food
   
   /* Takes one items and makes another.
    * converter is the object that is doing the conversion.
    * item is the object that triggered the converter - if it is not
    * what the converter wants, this will not do anything.
    */
 int convert_item(object *item, object *converter) {  int convert_item(object *item, object *converter) {
   int nr=0;    int nr=0;
   object *tmp;    object *tmp;
Line 780
 
Line 785
     if(item->type==PLAYER||CONV_FROM(converter)!=item->arch->name||      if(item->type==PLAYER||CONV_FROM(converter)!=item->arch->name||
       (CONV_NEED(converter)&&CONV_NEED(converter)>item->nrof))        (CONV_NEED(converter)&&CONV_NEED(converter)>item->nrof))
       return 0;        return 0;
   
     if(CONV_NEED(converter)) {      if(CONV_NEED(converter)) {
       nr=item->nrof/CONV_NEED(converter);        nr=item->nrof/CONV_NEED(converter);
       decrease_ob_nr(item,nr*CONV_NEED(converter));        decrease_ob_nr(item,nr*CONV_NEED(converter));
Line 794
 
Line 800
  converter->name, converter->map->path, converter->x, converter->y);   converter->name, converter->map->path, converter->x, converter->y);
     return 0;      return 0;
   }    }
       fix_generated_item(item, converter, 0, 0, GT_MINIMAL);
   if(CONV_NR(converter))    if(CONV_NR(converter))
     item->nrof=CONV_NR(converter);      item->nrof=CONV_NR(converter);
   if(nr)    if(nr)
Line 3801
 
Line 3808
         find++;          find++;
     while ( *find == ' ' )      while ( *find == ' ' )
         find++;          find++;
     if ( separator = strchr( find, ';' ) )      if ( (separator = strchr( find, ';' ))!=NULL)
         {          {
         strncpy( got, find, MIN( separator - find, MAX_BUF ) );          strncpy( got, find, MIN( separator - find, MAX_BUF ) );
         }          }


Legend:
line(s) removed in v.1.119 
line(s) changed
 line(s) added in v.1.120

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