Difference for server/attack.c from version 1.40 to 1.41


version 1.40 version 1.41
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.40 2001/07/14 04:11:18 mwedel Exp $";   *   "$Id: attack.c,v 1.41 2001/08/21 05:39:30 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 262
 
Line 262
   
     /* Something could have happened to 'tmp' while 'tmp->below' was processed.      /* Something could have happened to 'tmp' while 'tmp->below' was processed.
      * For example, 'tmp' was put in an icecube.       * For example, 'tmp' was put in an icecube.
        * This is one of the few cases where on_same_map should not be used.
      */       */
     if (tmp->map != map || tmp->x != x || tmp->y != y)      if (tmp->map != map || tmp->x != x || tmp->y != y)
       continue;        continue;
Line 352
 
Line 353
     }      }
     if (QUERY_FLAG (*target, FLAG_REMOVED)      if (QUERY_FLAG (*target, FLAG_REMOVED)
         || QUERY_FLAG (*hitter, FLAG_REMOVED)          || QUERY_FLAG (*hitter, FLAG_REMOVED)
         || (*hitter)->map == NULL || (*hitter)->map != (*target)->map)          || (*hitter)->map == NULL || !on_same_map((*hitter), (*target)))
     {      {
         LOG (llevError, "BUG: hitter (arch %s, name %s) with no relation to "          LOG (llevError, "BUG: hitter (arch %s, name %s) with no relation to "
              "target\n", (*hitter)->arch->name, (*hitter)->name);               "target\n", (*hitter)->arch->name, (*hitter)->name);
Line 373
 
Line 374
         new_mode = 1;          new_mode = 1;
     else if (QUERY_FLAG (hitter, FLAG_REMOVED)      else if (QUERY_FLAG (hitter, FLAG_REMOVED)
              || QUERY_FLAG (target, FLAG_REMOVED)               || QUERY_FLAG (target, FLAG_REMOVED)
              || hitter->map == NULL || hitter->map != target->map)               || hitter->map == NULL || !on_same_map(hitter, target))
         return 1;          return 1;
     else      else
         new_mode = 0;          new_mode = 0;
Line 1162
 
Line 1163
  add_kill_to_party(no,query_name(hitter),query_name(op),exp);   add_kill_to_party(no,query_name(hitter),query_name(op),exp);
 #endif  #endif
  for(pl=first_player;pl!=NULL;pl=pl->next) {   for(pl=first_player;pl!=NULL;pl=pl->next) {
      if(pl->ob->contr->party_number==no && (pl->ob->map == hitter->map)) {       if(pl->ob->contr->party_number==no && on_same_map(pl->ob, hitter)) {
  count++;   count++;
                         shares+=(pl->ob->level+4);                          shares+=(pl->ob->level+4);
      }       }
Line 1172
 
Line 1173
  else {   else {
      int share=exp/shares,given=0,nexp;       int share=exp/shares,given=0,nexp;
      for(pl=first_player;pl!=NULL;pl=pl->next) {       for(pl=first_player;pl!=NULL;pl=pl->next) {
                         if(pl->ob->contr->party_number==no && (pl->ob->map == hitter->map))                          if(pl->ob->contr->party_number==no && on_same_map(pl->ob, hitter))
                         {                          {
                                 nexp=(pl->ob->level+4)*share;                                  nexp=(pl->ob->level+4)*share;
                                 add_exp(pl->ob,nexp);                                  add_exp(pl->ob,nexp);
Line 1671
 
Line 1672
   int adjust=0;    int adjust=0;
   
   /* safety */    /* safety */
   if(!target||!hitter||!hitter->map||!target->map||hitter->map!=target->map) {    if(!target||!hitter||!hitter->map||!target->map||!on_same_map(hitter,target)) {
     LOG (llevError, "BUG: adj_attackroll(): hitter and target not on same "      LOG (llevError, "BUG: adj_attackroll(): hitter and target not on same "
          "map\n");           "map\n");
     return 0;      return 0;


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 17:25