Difference for socket/request.c from version 1.22 to 1.23


version 1.22 version 1.23
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_init_c =   * static char *rcsid_init_c =
  *    "$Id: request.c,v 1.22 2001/08/29 15:50:28 reeve Exp $";   *    "$Id: request.c,v 1.23 2001/10/30 00:49:03 michtoen Exp $";
  */   */
   
 /*  /*
Line 331
 
Line 331
     SockList_AddShort(&sl,packet);      SockList_AddShort(&sl,packet);
     if (FABS(pl->ob->speed) < 0.001) time=MAX_TIME * 100;      if (FABS(pl->ob->speed) < 0.001) time=MAX_TIME * 100;
     else      else
  time = MAX_TIME/ FABS(pl->ob->speed);   time = (int) (MAX_TIME/ FABS(pl->ob->speed));
     SockList_AddInt(&sl,time);      SockList_AddInt(&sl,time);
     Send_With_Handling(&pl->socket, &sl);      Send_With_Handling(&pl->socket, &sl);
 }  }
Line 564
 
Line 564
   
 #define AddIfInt(Old,New,Type) if (Old != New) {\  #define AddIfInt(Old,New,Type) if (Old != New) {\
  Old = New; \   Old = New; \
  SockList_AddChar(&sl, Type); \   SockList_AddChar(&sl, (char)Type); \
  SockList_AddInt(&sl, New); \   SockList_AddInt(&sl, New); \
         }          }
   
 #define AddIfShort(Old,New,Type) if (Old != New) {\  #define AddIfShort(Old,New,Type) if (Old != New) {\
  Old = New; \   Old = New; \
  SockList_AddChar(&sl, Type); \   SockList_AddChar(&sl, (char)Type); \
  SockList_AddShort(&sl, New); \   SockList_AddShort(&sl, New); \
         }          }
   
 #define AddIfFloat(Old,New,Type) if (Old != New) {\  #define AddIfFloat(Old,New,Type) if (Old != New) {\
  Old = New; \   Old = New; \
  SockList_AddChar(&sl, Type); \   SockList_AddChar(&sl, (char) Type); \
  SockList_AddInt(&sl,(long)(New*FLOAT_MULTI));\   SockList_AddInt(&sl,(long)(New*FLOAT_MULTI));\
  }   }
   
 #define AddIfString(Old,New,Type) if (Old == NULL || strcmp(Old,New)) {\  #define AddIfString(Old,New,Type) if (Old == NULL || strcmp(Old,New)) {\
  if (Old) free(Old);\   if (Old) free(Old);\
                  Old = strdup_local(New);\                   Old = strdup_local(New);\
  SockList_AddChar(&sl, Type); \   SockList_AddChar(&sl, (char)Type); \
  SockList_AddChar(&sl, strlen(New)); \   SockList_AddChar(&sl, (char) strlen(New)); \
  strcpy((char*)sl.buf + sl.len, New); \   strcpy((char*)sl.buf + sl.len, New); \
  sl.len += strlen(New); \   sl.len += strlen(New); \
  }   }
Line 631
 
Line 631
         }          }
     }      }
     AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP);      AddIfInt(pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP);
     AddIfShort(pl->last_level, pl->ob->level, CS_STAT_LEVEL);      AddIfShort(pl->last_level, (char) pl->ob->level, CS_STAT_LEVEL);
     AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC);      AddIfShort(pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC);
     AddIfShort(pl->last_stats.ac, pl->ob->stats.ac, CS_STAT_AC);      AddIfShort(pl->last_stats.ac, pl->ob->stats.ac, CS_STAT_AC);
     AddIfShort(pl->last_stats.dam, pl->ob->stats.dam, CS_STAT_DAM);      AddIfShort(pl->last_stats.dam, pl->ob->stats.dam, CS_STAT_DAM);
     AddIfFloat(pl->last_speed, pl->ob->speed, CS_STAT_SPEED);      AddIfFloat(pl->last_speed, pl->ob->speed, CS_STAT_SPEED);
     AddIfShort(pl->last_stats.food, pl->ob->stats.food, CS_STAT_FOOD);      AddIfShort(pl->last_stats.food, pl->ob->stats.food, CS_STAT_FOOD);
     AddIfFloat(pl->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP);      AddIfFloat(pl->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP);
     AddIfInt(pl->last_weight_limit, weight_limit[pl->ob->stats.Str], CS_STAT_WEIGHT_LIM);      AddIfInt((int)pl->last_weight_limit, weight_limit[pl->ob->stats.Str], CS_STAT_WEIGHT_LIM);
     flags=0;      flags=0;
     if (pl->fire_on) flags |=SF_FIREON;      if (pl->fire_on) flags |=SF_FIREON;
     if (pl->run_on) flags |= SF_RUNON;      if (pl->run_on) flags |= SF_RUNON;
Line 923
 
Line 923
      /* Now, we back the redundant data into 1 byte xy pairings */       /* Now, we back the redundant data into 1 byte xy pairings */
      for(y=x;y<layers[k].count;y++) {       for(y=x;y<layers[k].count;y++) {
  if (layers[k].lcells[y].face == face) {   if (layers[k].lcells[y].face == face) {
      *cur = layers[k].lcells[y].xy;       *cur = (unsigned char) layers[k].lcells[y].xy;
      cur++;       cur++;
      layers[k].lcells[y].face = -1;       layers[k].lcells[y].face = -1;
  }   }


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

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