components/prboom/p_map.c
//
// P_LineAttack
// If damage == 0, it is just a test trace
// that will leave linetarget set.
//
P_LineAttack
If damage == 0, it is just a test trace
that will leave linetarget set.
P_LineAttack If damage == 0 it is just a test trace that will leave linetarget set .
void P_LineAttack
(mobj_t* t1,
 angle_t angle,
 fixed_t distance,
 fixed_t slope,
 int     damage)
  {
  fixed_t x2;
  fixed_t y2;
  angle >>= ANGLETOFINESHIFT;
  shootthing = t1;
  la_damage = damage;
  x2 = t1->x + (distance>>FRACBITS)*finecosine[angle];
  y2 = t1->y + (distance>>FRACBITS)*finesine[angle];
  shootz = t1->z + (t1->height>>1) + 8*FRACUNIT;
  attackrange = distance;
  aimslope = slope;
  P_PathTraverse(t1->x,t1->y,x2,y2,PT_ADDLINES|PT_ADDTHINGS,PTR_ShootTraverse);
  }
void P_LineAttack ( mobj_t * t1 , angle_t angle , fixed_t distance , fixed_t slope , int damage ) { fixed_t x2 ; fixed_t y2 ; angle >>= ANGLETOFINESHIFT ; shootthing = t1 ; la_damage = damage ; x2 = t1 -> x + ( distance >> FRACBITS ) * finecosine [ angle ] ; y2 = t1 -> y + ( distance >> FRACBITS ) * finesine [ angle ] ; shootz = t1 -> z + ( t1 -> height >> 1 ) + 8 * FRACUNIT ; attackrange = distance ; aimslope = slope ; P_PathTraverse ( t1 -> x , t1 -> y , x2 , y2 , PT_ADDLINES | PT_ADDTHINGS , PTR_ShootTraverse ) ; }
P_LineAttack
If damage == 0, it is just a test trace
that will leave linetarget set.
P_LineAttack If damage == 0 it is just a test trace that will leave linetarget set .