components/prboom/p_map.c
//
// P_RadiusAttack
// Source is the creature that caused the explosion at spot.
//
P_RadiusAttack
Source is the creature that caused the explosion at spot.
P_RadiusAttack Source is the creature that caused the explosion at spot .
void P_RadiusAttack(mobj_t* spot,mobj_t* source,int damage)
  {
  int x;
  int y;
  int xl;
  int xh;
  int yl;
  int yh;
  fixed_t dist;
  dist = (damage+MAXRADIUS)<<FRACBITS;
  yh = (spot->y + dist - bmaporgy)>>MAPBLOCKSHIFT;
  yl = (spot->y - dist - bmaporgy)>>MAPBLOCKSHIFT;
  xh = (spot->x + dist - bmaporgx)>>MAPBLOCKSHIFT;
  xl = (spot->x - dist - bmaporgx)>>MAPBLOCKSHIFT;
  bombspot = spot;
  bombsource = source;
  bombdamage = damage;
  for (y=yl ; y<=yh ; y++)
    for (x=xl ; x<=xh ; x++)
      P_BlockThingsIterator (x, y, PIT_RadiusAttack );
  }
void P_RadiusAttack ( mobj_t * spot , mobj_t * source , int damage ) { int x ; int y ; int xl ; int xh ; int yl ; int yh ; fixed_t dist ; dist = ( damage + MAXRADIUS ) << FRACBITS ; yh = ( spot -> y + dist - bmaporgy ) >> MAPBLOCKSHIFT ; yl = ( spot -> y - dist - bmaporgy ) >> MAPBLOCKSHIFT ; xh = ( spot -> x + dist - bmaporgx ) >> MAPBLOCKSHIFT ; xl = ( spot -> x - dist - bmaporgx ) >> MAPBLOCKSHIFT ; bombspot = spot ; bombsource = source ; bombdamage = damage ; for ( y = yl ; y <= yh ; y ++ ) for ( x = xl ; x <= xh ; x ++ ) P_BlockThingsIterator ( x , y , PIT_RadiusAttack ) ; }
P_RadiusAttack
Source is the creature that caused the explosion at spot.
P_RadiusAttack Source is the creature that caused the explosion at spot .