Difference for socket/request.c from version 1.40 to 1.41


version 1.40 version 1.41
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_init_c =   * static char *rcsid_init_c =
  *    "$Id: request.c,v 1.40 2002/07/01 23:04:10 mwedel Exp $";   *    "$Id: request.c,v 1.41 2002/07/15 04:57:13 mwedel Exp $";
  */   */
   
 /*  /*
Line 94
 
Line 94
     CS_STAT_RES_DEPLETE, CS_STAT_RES_DEATH,      CS_STAT_RES_DEPLETE, CS_STAT_RES_DEATH,
     -1 /* Chaos */, -1 /* Counterspell */,      -1 /* Chaos */, -1 /* Counterspell */,
     -1 /* Godpower */, CS_STAT_RES_HOLYWORD,      -1 /* Godpower */, CS_STAT_RES_HOLYWORD,
     CS_STAT_RES_BLIND,    -1 /* Blind */      CS_STAT_RES_BLIND,
       -1 /* Internal */, -1 /* life stealing */
 };  };
   
 /* This is the Setup cmd - easy first implementation */  /* This is the Setup cmd - easy first implementation */
Line 274
 
Line 275
      */       */
     if (atoi(buf) || buf[0]=='0') {      if (atoi(buf) || buf[0]=='0') {
  pl->count=atoi((char*)buf);   pl->count=atoi((char*)buf);
  pl->count_left=0;  
  buf=strchr(buf,' '); /* advance beyond the numbers */   buf=strchr(buf,' '); /* advance beyond the numbers */
  if (!buf) {   if (!buf) {
 #ifdef ESRV_DEBUG  #ifdef ESRV_DEBUG
Line 284
 
Line 284
  }   }
  buf++;   buf++;
     }      }
     pl->idle=0;  
     /* This should not happen anymore.    */      /* This should not happen anymore.    */
     if (pl->ob->speed_left<-1.0) {      if (pl->ob->speed_left<-1.0) {
  LOG(llevError,"Player has negative time - shouldn't do command.\n");   LOG(llevError,"Player has negative time - shouldn't do command.\n");
Line 297
 
Line 296
      * commands.       * commands.
      */       */
   
     pl->count_left=0;  
     pl->count=0;      pl->count=0;
   
 }  }
Line 324
 
Line 322
     /* -1 is special - no repeat, but don't update */      /* -1 is special - no repeat, but don't update */
     if (repeat!=-1) {      if (repeat!=-1) {
  pl->count=repeat;   pl->count=repeat;
  pl->count_left=0;  
     }      }
     if ((len-4) >= MAX_BUF) len=MAX_BUF-5;      if ((len-4) >= MAX_BUF) len=MAX_BUF-5;
   
Line 342
 
Line 339
  return;   return;
     }      }
   
     pl->idle=0;  
   
     /* This should not happen anymore.    */      /* This should not happen anymore.    */
     if (pl->ob->speed_left<-1.0) {      if (pl->ob->speed_left<-1.0) {
  LOG(llevError,"Player has negative time - shouldn't do command.\n");   LOG(llevError,"Player has negative time - shouldn't do command.\n");
Line 355
 
Line 350
      * for the command that issued the count should be done before any other       * for the command that issued the count should be done before any other
      * commands.       * commands.
      */       */
     pl->count_left=0;  
     pl->count=0;      pl->count=0;
   
     /* Send confirmation of command execution now */      /* Send confirmation of command execution now */
Line 626
 
Line 620
     if(pl->last_stats.exp != pl->ob->stats.exp && pl->socket.skillexp)       if(pl->last_stats.exp != pl->ob->stats.exp && pl->socket.skillexp)
     {      {
  int s;   int s;
  for(s=0;s<pl->last_skill_index;s++)   for(s=0;s<pl->last_skill_index;s++) {
         {  
         AddIfInt(pl->last_skill_exp[s],pl->last_skill_ob[s]->stats.exp , pl->last_skill_id[s]);          AddIfInt(pl->last_skill_exp[s],pl->last_skill_ob[s]->stats.exp , pl->last_skill_id[s]);
         AddIfShort(pl->last_skill_level[s],pl->last_skill_ob[s]->level , pl->last_skill_id[s]+1);          AddIfShort(pl->last_skill_level[s],pl->last_skill_ob[s]->level , pl->last_skill_id[s]+1);
     }      }
Line 658
 
Line 651
  }   }
     }      }
    
     /* the user set title is nothing we don't use in new client.  
      * If so, pack it behind name   
      */  
     if(pl->socket.ext2) /* for the ext2 client, we send complex title  and no range info*/  
     {  
         if(pl->socket.ext_title_flag)  
         {  
             generate_ext_title(pl);  
             AddIfString(pl->socket.stats.ext_title , pl->ext_title, CS_STAT_EXT_TITLE);  
               
             /* ugly little sucker, but so we got the arch name in class select of the  
              * client and we don't must change above anything */  
             if(pl->socket.ext_title_flag==2)  
             {  
                 set_title(pl->ob, buf);  
                 AddIfString(pl->socket.stats.title, buf, CS_STAT_TITLE);  
             }  
             pl->socket.ext_title_flag = 0;  
         }  
     }  
     else /* for old clients, the normal range & title cmd */  
     {      
  rangetostring(pl->ob, buf); /* we want use the new fire & run system in new client */   rangetostring(pl->ob, buf); /* we want use the new fire & run system in new client */
         AddIfString(pl->socket.stats.range, buf, CS_STAT_RANGE);          AddIfString(pl->socket.stats.range, buf, CS_STAT_RANGE);
         set_title(pl->ob, buf);          set_title(pl->ob, buf);
         AddIfString(pl->socket.stats.title, buf, CS_STAT_TITLE);          AddIfString(pl->socket.stats.title, buf, CS_STAT_TITLE);
     }  
   
     /* Only send it away if we have some actual data */      /* Only send it away if we have some actual data */
     if (sl.len>6) {      if (sl.len>6) {


Legend:
line(s) removed in v.1.40 
line(s) changed
 line(s) added in v.1.41

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