Difference for common/living.c from version 1.44 to 1.45


version 1.44 version 1.45
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_living_c =   * static char *rcsid_living_c =
  *   "$Id: living.c,v 1.44 2002/12/03 07:40:10 mwedel Exp $";   *   "$Id: living.c,v 1.45 2002/12/06 05:36:28 mwedel Exp $";
  */   */
   
 /*  /*
Line 1621
 
Line 1621
  * Note that if permanent exp is used, player may not in fact lose   * Note that if permanent exp is used, player may not in fact lose
  * as much as listed.  Eg, if player has gotten reduced to the point   * as much as listed.  Eg, if player has gotten reduced to the point
  * where everything is at the minimum perm exp, he would lose nothing.   * where everything is at the minimum perm exp, he would lose nothing.
    * exp is the amount of exp to subtract - thus, it should be
    * a postive number.
  */   */
 static void subtract_player_exp(object *op, int exp)  static void subtract_player_exp(object *op, int exp)
 {  {
Line 1628
 
Line 1630
     object *tmp;      object *tmp;
     int total_loss = 0, del_exp;      int total_loss = 0, del_exp;
   
   
     for(tmp=op->inv;tmp;tmp=tmp->below)      for(tmp=op->inv;tmp;tmp=tmp->below)
  if(tmp->type==EXPERIENCE && tmp->stats.exp) {    if(tmp->type==EXPERIENCE && tmp->stats.exp) {
      del_exp = check_exp_loss(tmp, tmp->stats.exp * fraction);       del_exp = check_exp_loss(tmp, tmp->stats.exp * fraction);
Line 1695
 
Line 1696
  if(exp>0)    if(exp>0)
      add_player_exp(op, exp);       add_player_exp(op, exp);
  else   else
      subtract_player_exp(op, exp);       subtract_player_exp(op, FABS(exp));
   
     }      }
     /* Reset players experience object pointer - From old code -      /* Reset players experience object pointer - From old code -


Legend:
line(s) removed in v.1.44 
line(s) changed
 line(s) added in v.1.45

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