Difference for common/utils.c from version 1.10 to 1.11


version 1.10 version 1.11
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_utils_c =   * static char *rcsid_utils_c =
  *   "$Id: utils.c,v 1.10 2003/02/14 05:50:29 garbled Exp $";   *   "$Id: utils.c,v 1.11 2003/05/21 07:31:13 mwedel Exp $";
  */   */
   
 /*  /*
Line 255
 
Line 255
     if (op->materialname != NULL)      if (op->materialname != NULL)
  return;   return;
   
   
   
     if (nmt == NULL) {      if (nmt == NULL) {
  lmt = NULL;   lmt = NULL;
   #ifndef NEW_MATERIAL_CODE
    for (mt = materialt; mt != NULL && mt->next != NULL; mt=mt->next) {
        if (op->material & mt->material) {
    lmt = mt;
    break;
        }
    }
   
   #else
  for (mt = materialt; mt != NULL && mt->next != NULL; mt=mt->next) {   for (mt = materialt; mt != NULL && mt->next != NULL; mt=mt->next) {
      if (op->material & mt->material && rndm(1, 100) <= mt->chance &&       if (op->material & mt->material && rndm(1, 100) <= mt->chance &&
  difficulty >= mt->difficulty &&   difficulty >= mt->difficulty &&
Line 266
 
Line 277
      break;       break;
      }       }
  }   }
   #endif
     } else {      } else {
  lmt = nmt;   lmt = nmt;
     }      }
   
     if (lmt != NULL) {      if (lmt != NULL) {
   #ifndef NEW_MATERIAL_CODE
    op->materialname = add_string(lmt->name);
    return;
   #endif
   
  if (op->stats.dam && IS_WEAPON(op)) {   if (op->stats.dam && IS_WEAPON(op)) {
      op->stats.dam += lmt->damage;       op->stats.dam += lmt->damage;
      if (op->stats.dam < 1)       if (op->stats.dam < 1)


Legend:
line(s) removed in v.1.10 
line(s) changed
 line(s) added in v.1.11

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