Difference for socket/info.c from version 1.10 to 1.11


version 1.10 version 1.11
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_sock_info_c =   * static char *rcsid_sock_info_c =
  *   "$Id: info.c,v 1.10 2002/11/13 00:49:47 garbled Exp $";   *   "$Id: info.c,v 1.11 2002/11/30 04:17:41 mwedel Exp $";
  */   */
   
 /*  /*
Line 282
 
Line 282
   
 void rangetostring(object *pl,char *obuf)  void rangetostring(object *pl,char *obuf)
 {  {
   int chosen_spell;  
   
   chosen_spell = (pl->contr->shoottype==range_magic)? pl->contr->chosen_spell :  
       pl->contr->chosen_item_spell;  
   switch(pl->contr->shoottype) {    switch(pl->contr->shoottype) {
    case range_none:     case range_none:
     strcpy(obuf,"Range: nothing");      strcpy(obuf,"Range: nothing");
     break;      break;
    case range_bow: {  
      char *s;   case range_bow:
        {
      object *op;       object *op;
   
      for (op = pl->inv; op; op=op->below)       for (op = pl->inv; op; op=op->below)
        if (op->type == BOW && QUERY_FLAG (op, FLAG_APPLIED))         if (op->type == BOW && QUERY_FLAG (op, FLAG_APPLIED))
        break;         break;
      if(op==NULL) break;       if(op==NULL) break;
      s = query_name(op);  
 #if 1                         /* Hack to remove (readied) from a bow description */       sprintf (obuf, "Range: %s (%s)", query_base_name(op, 0),
      if (strcmp (s + strlen (s) - 10, " (readied)") == 0)        op->race ? op->race : "nothing");
        s[strlen (s) - 10] = 0;  
 #endif  
      sprintf (obuf, "Range: %s (%s)", s,   
             op && op->race ? op->race : "nothing");  
    }     }
     break;      break;
   
    case range_magic:     case range_magic:
        if (settings.casting_time == TRUE) {         if (settings.casting_time == TRUE) {
     if (pl->casting > -1) {      if (pl->casting > -1) {
Line 325
 
Line 320
   
    case range_misc:     case range_misc:
     sprintf(obuf,"Range: %s",       sprintf(obuf,"Range: %s",
      pl->contr->ranges[range_misc]?query_base_name(pl->contr->ranges[range_misc],0): "none");       pl->contr->ranges[range_misc]?
        query_base_name(pl->contr->ranges[range_misc],0): "none");
     break;      break;
   
     /* range_scroll is only used for controlling golems.  If the      /* range_scroll is only used for controlling golems.  If the
Line 339
 
Line 335
       strcpy(obuf,"Range: nothing");        strcpy(obuf,"Range: nothing");
     }      }
     break;      break;
   
    case range_skill:     case range_skill:
        sprintf(obuf,"Skill: %s", pl->chosen_skill!=NULL ?         sprintf(obuf,"Skill: %s", pl->chosen_skill!=NULL ?
  skills[pl->chosen_skill->stats.sp].name : "none");   skills[pl->chosen_skill->stats.sp].name : "none");
     break;      break;
   
    default:     default:
     strcpy(obuf,"Range: illegal");      strcpy(obuf,"Range: illegal");
   }    }


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 19:34