Difference for server/spell_attack.c from version 1.29 to 1.30


version 1.29 version 1.30
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_attack_c =   * static char *rcsid_spell_attack_c =
  *   "$Id: spell_attack.c,v 1.29 2005/12/01 08:25:45 mwedel Exp $";   *   "$Id: spell_attack.c,v 1.30 2005/12/10 14:27:10 akirschbaum Exp $";
  */   */
   
   
Line 212
 
Line 212
  op->direction=absdir(op->direction+4);   op->direction=absdir(op->direction+4);
      else {       else {
  int left, right;   int left, right;
    int mflags;
   
  get_map_flags(op->map, &m, op->x+freearr_x[absdir(op->direction-1)],   /* Need to check for P_OUT_OF_MAP: if the bolt is tavelling
    * over a corner in a tiled map, it is possible that
    * op->direction is within an adjacent map but either
    * op->direction-1 or op->direction+1 does not exist.
    */
    mflags = get_map_flags(op->map, &m, op->x+freearr_x[absdir(op->direction-1)],
         op->y+freearr_y[absdir(op->direction-1)], &x, &y);          op->y+freearr_y[absdir(op->direction-1)], &x, &y);
   
  left = OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, x, y));   left = (mflags & P_OUT_OF_MAP) ? 0 : OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, x, y));
   
  get_map_flags(op->map, &m, op->x+freearr_x[absdir(op->direction+1)],   mflags = get_map_flags(op->map, &m, op->x+freearr_x[absdir(op->direction+1)],
                               op->y+freearr_y[absdir(op->direction+1)], &x, &y);                                op->y+freearr_y[absdir(op->direction+1)], &x, &y);
  right = OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, x, y));   right = (mflags & P_OUT_OF_MAP) ? 0 : OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, x, y));
   
  if(left==right)   if(left==right)
      op->direction=absdir(op->direction+4);       op->direction=absdir(op->direction+4);
Line 1152
 
Line 1158
   
     mflags = get_map_flags(op->map, &m, new_x, new_y, &new_x, &new_y);      mflags = get_map_flags(op->map, &m, new_x, new_y, &new_x, &new_y);
   
     if ((mflags & P_IS_ALIVE) || OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, new_x, new_y))) {      if (!(mflags & P_OUT_OF_MAP) &&
    ((mflags & P_IS_ALIVE) || OB_TYPE_MOVE_BLOCK(op, GET_MAP_MOVE_BLOCK(m, new_x, new_y)))) {
  tag_t tag = op->count;   tag_t tag = op->count;
  hit_map (op, op->direction, AT_MAGIC, 1);   hit_map (op, op->direction, AT_MAGIC, 1);
  /* Basically, missile only hits one thing then goes away.   /* Basically, missile only hits one thing then goes away.


Legend:
line(s) removed in v.1.29 
line(s) changed
 line(s) added in v.1.30

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