Difference for server/player.c from version 1.103 to 1.104


version 1.103 version 1.104
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_player_c =   * static char *rcsid_player_c =
  *   "$Id: player.c,v 1.103 2002/11/13 05:49:04 garbled Exp $";   *   "$Id: player.c,v 1.104 2002/11/26 07:44:29 garbled Exp $";
  */   */
   
 /*  /*
Line 132
 
Line 132
     p->outputs_sync=16; /* Every 2 seconds */      p->outputs_sync=16; /* Every 2 seconds */
     p->outputs_count=1; /* Keeps present behaviour */      p->outputs_count=1; /* Keeps present behaviour */
     p->unapply = unapply_nochoice;      p->unapply = unapply_nochoice;
 #ifdef USE_SWAP_STATS  
     p->Swap_First = -1;      p->Swap_First = -1;
 #endif  
   
 #ifdef AUTOSAVE  #ifdef AUTOSAVE
     p->last_save_tick = 9999999;      p->last_save_tick = 9999999;
Line 659
 
Line 657
  op->stats.Con+op->stats.Wis+op->stats.Pow+   op->stats.Con+op->stats.Wis+op->stats.Pow+
  op->stats.Cha;   op->stats.Cha;
   } while(sum<82||sum>116);    } while(sum<82||sum>116);
 #if defined( USE_SWAP_STATS) && defined(SORT_ROLLED_STATS)  
  /* Sort the stats so that rerolling is easier... */   /* Sort the stats so that rerolling is easier... */
  {   {
          int             i = 0, j = 0;           int             i = 0, j = 0;
Line 693
 
Line 690
          op->stats.Pow = statsort[5];           op->stats.Pow = statsort[5];
          op->stats.Cha = statsort[6];           op->stats.Cha = statsort[6];
       }        }
 #endif /* SWAP_STATS */  
   
   op->contr->orig_stats.Str=op->stats.Str;    op->contr->orig_stats.Str=op->stats.Str;
   op->contr->orig_stats.Dex=op->stats.Dex;    op->contr->orig_stats.Dex=op->stats.Dex;
Line 718
 
Line 714
 void Roll_Again(object *op)  void Roll_Again(object *op)
 {  {
     esrv_new_player(op->contr, 0);      esrv_new_player(op->contr, 0);
 #ifndef USE_SWAP_STATS  
     send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"Roll again (y/n)? ");  
 #else  
     send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"[y] to roll new stats [n] to use stats\n[1-7] [1-7] to swap stats.\nRoll again (y/n/1-7)?  ");      send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"[y] to roll new stats [n] to use stats\n[1-7] [1-7] to swap stats.\nRoll again (y/n/1-7)?  ");
 #endif /* USE_SWAP_STATS */  
 }  }
   
 void Swap_Stat(object *op,int Swap_Second)  void Swap_Stat(object *op,int Swap_Second)
 {  {
 #ifdef USE_SWAP_STATS  
   signed char tmp;    signed char tmp;
   char buf[MAX_BUF];    char buf[MAX_BUF];
   
Line 766
 
Line 757
     op->stats.hp=op->stats.maxhp;      op->stats.hp=op->stats.maxhp;
     add_exp(op,0);      add_exp(op,0);
     op->contr->Swap_First=-1;      op->contr->Swap_First=-1;
 #endif /* USE_SWAP_STATS */  
 }  }
   
   
Line 783
 
Line 773
     char buf[MAX_BUF];      char buf[MAX_BUF];
     static sint8 stat_trans[] = {-1, STR, DEX, CON, INT, WIS, POW, CHA};      static sint8 stat_trans[] = {-1, STR, DEX, CON, INT, WIS, POW, CHA};
   
 #ifdef USE_SWAP_STATS  
     if (keynum>0 && keynum<=7) {      if (keynum>0 && keynum<=7) {
  if (op->contr->Swap_First==-1) {   if (op->contr->Swap_First==-1) {
      op->contr->Swap_First=stat_trans[keynum];       op->contr->Swap_First=stat_trans[keynum];
Line 796
 
Line 785
  send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"");   send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"");
  return 1;   return 1;
     }      }
 #endif  
     switch (key) {      switch (key) {
  case 'n':   case 'n':
         case 'N': {          case 'N': {
Line 833
 
Line 821
       return 1;        return 1;
   
      default:       default:
 #ifndef USE_SWAP_STATS  
    send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"Yes, No or Quit. Roll again?");  
 #else  
    send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"Yes, No, Quit or 1-6.  Roll again?");     send_query(&op->contr->socket,CS_QUERY_SINGLECHAR,"Yes, No, Quit or 1-6.  Roll again?");
 #endif /* USE_SWAP_STATS */  
  return 0;   return 0;
     }      }
     return 0;      return 0;


Legend:
line(s) removed in v.1.103 
line(s) changed
 line(s) added in v.1.104

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