Difference for common/recipe.c from version 1.2 to 1.3


version 1.2 version 1.3
Line 568
 
Line 568
   /* looks like we have to choose a random one */     /* looks like we have to choose a random one */
   if(fl==NULL) if((fl=get_random_recipelist())==NULL) return rp;    if(fl==NULL) if((fl=get_random_recipelist())==NULL) return rp;
   
     if (fl->total_chance > 0) {
   r=RANDOM()%fl->total_chance;    r=RANDOM()%fl->total_chance;
       printf("  r = %d\n", r);
   for (rp=fl->items;rp;rp=rp->next) {    for (rp=fl->items;rp;rp=rp->next) {
       r -= rp->chance;        r -= rp->chance;
       if (r<0) break;        if (r<0) break;
   }    }
     }
   return rp;    return rp;
 }  }
   


Legend:
line(s) removed in v.1.2 
line(s) changed
 line(s) added in v.1.3

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