// If the tough parameter is not set, then it can't break tough walls and sprites BOOL HitBreakWall ( WALLp wp, long hitx, long hity, long hitz, short ang, short type ) { short SpriteNum; short match = wp->hitag; if ( match > 0 ) { UserBreakWall ( wp, ang ); return ( TRUE ); } //if (hitx == MAXLONG) { short sectnum; WallBreakPosition ( wp - wall, §num, &hitx, &hity, &hitz, &ang ); } AutoBreakWall ( wp, hitx, hity, hitz, ang, type ); return ( TRUE ); }
void DoWallBreakMatch( short match ) { short i,sectnum; long x,y,z; WALLp wp; short nw,wall_ang; for(i=0; i<=numwalls; i++) { if (wall[i].hitag == match) { WallBreakPosition(i, §num, &x, &y, &z, &wall_ang); //nw = wall[i].point2; //wall_ang = NORM_ANGLE(getangle(wall[nw].x - wall[i].x, wall[nw].y - wall[i].y)+512); wp = &wall[i]; wp->hitag = 0; // Reset the hitag AutoBreakWall(wp, x, y, z, wall_ang, 0); } } }