Difference for server/attack.c from version 1.46 to 1.47


version 1.46 version 1.47
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.46 2001/10/15 21:12:08 garbled Exp $";   *   "$Id: attack.c,v 1.47 2001/10/19 06:57:32 garbled Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 289
 
Line 289
 void attack_message(int dam, int type, object *op, object *hitter) {  void attack_message(int dam, int type, object *op, object *hitter) {
   char buf[MAX_BUF], buf1[MAX_BUF], buf2[MAX_BUF];    char buf[MAX_BUF], buf1[MAX_BUF], buf2[MAX_BUF];
   int i, found=0;    int i, found=0;
     mapstruct *map;
     object *next, *tmp;
   
   /* put in a few special messages for some of the common attacktypes    /* put in a few special messages for some of the common attacktypes
    *  a player might have.  For example, fire, electric, cold, etc     *  a player might have.  For example, fire, electric, cold, etc
Line 435
 
Line 437
  play_sound_player_only(hitter->contr, SOUND_PLAYER_HITS3,0,0);   play_sound_player_only(hitter->contr, SOUND_PLAYER_HITS3,0,0);
  }   }
  new_draw_info(NDI_BLACK, 0, hitter, buf);   new_draw_info(NDI_BLACK, 0, hitter, buf);
     } else if(get_owner(hitter)!=NULL&&hitter->owner->type==PLAYER &&      } else if(get_owner(hitter)!=NULL&&hitter->owner->type==PLAYER) {
        rndm(0, 5) == 0) {        /* look for stacked spells and start reducing the message chances */
           if (hitter->type == FBALL || hitter->type == FBULLET ||
        hitter->type == CONE) {
       i=4;
       map = hitter->map;
       if (out_of_map(map, hitter->x, hitter->y))
           return;
       next = get_map_ob(map, hitter->x, hitter->y);
       if (next)
           while(next) {
       if (next->type == FBALL || next->type == FBULLET ||
           next->type == CONE)
           i*=3;
       tmp = next;
       next = tmp->above;
           }
       if (i < 0)
           return;
       if (rndm(0, i) != 0)
           return;
    } else if (rndm(0, 5) != 0)
        return;
         sprintf(buf,"Your %s%s %s.", hitter->name, buf2, op->name);          sprintf(buf,"Your %s%s %s.", hitter->name, buf2, op->name);
  play_sound_map(op->map, op->x, op->y, SOUND_PLAYER_HITS4);   play_sound_map(op->map, op->x, op->y, SOUND_PLAYER_HITS4);
  new_draw_info(NDI_BLACK, 0, hitter->owner, buf);   new_draw_info(NDI_BLACK, 0, hitter->owner, buf);


Legend:
line(s) removed in v.1.46 
line(s) changed
 line(s) added in v.1.47

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