Difference for server/disease.c from version 1.21 to 1.22


version 1.21 version 1.22
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_disease_c =   * static char *rcsid_disease_c =
  *   "$Id: disease.c,v 1.21 2002/08/03 05:04:14 mwedel Exp $";   *   "$Id: disease.c,v 1.22 2002/09/15 03:15:17 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 162
 
Line 162
 }  }
   
 int move_disease(object *disease) {  int move_disease(object *disease) {
   
 /*  first task is to determine if the disease is inside or outside of someone.  /*  first task is to determine if the disease is inside or outside of someone.
 If outside, we decrement 'hp' until we're gone. */       * If outside, we decrement 'hp' until we're gone.
        */
   
   if(disease->env==NULL) { /* we're outside of someone */    if(disease->env==NULL) { /* we're outside of someone */
     disease->value--;      disease->value--;
Line 176
 
Line 176
   } else {    } else {
     /* if we're inside a person, have the disease run its course */      /* if we're inside a person, have the disease run its course */
     /* negative foods denote "perpetual" diseases. */      /* negative foods denote "perpetual" diseases. */
     if(disease->stats.food>0 && is_susceptible_to_disease(disease->env, disease)) {   if(disease->stats.food>0) {
       disease->stats.food--;        disease->stats.food--;
       if(disease->stats.food==0) {        if(disease->stats.food==0) {
  remove_symptoms(disease);  /* remove the symptoms of this disease */   remove_symptoms(disease);  /* remove the symptoms of this disease */
Line 187
 
Line 187
       }        }
     }      }
   }    }
   
   /*  check to see if we infect others */    /*  check to see if we infect others */
   check_infection(disease);    check_infection(disease);
   
   /* impose or modify the symptoms of the disease */    /* impose or modify the symptoms of the disease */
   if(disease->env)      if(disease->env && is_susceptible_to_disease(disease->env, disease))
     do_symptoms(disease);      do_symptoms(disease);
   
   return 0;    return 0;
Line 215
 
Line 214
 /* argument is a disease */  /* argument is a disease */
 object * find_symptom(object *disease) {  object * find_symptom(object *disease) {
   object *walk;    object *walk;
   char symptom_name[256];  
   sprintf(symptom_name,"%s",disease->name);  
   
   /* check the inventory for symptoms */    /* check the inventory for symptoms */
   for(walk=disease->env->inv;walk;walk = walk->below)     for(walk=disease->env->inv;walk;walk = walk->below)


Legend:
line(s) removed in v.1.21 
line(s) changed
 line(s) added in v.1.22

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