remove VX_NearbySprites (#1701)

This commit is contained in:
Roman Fomin 2024-05-24 21:39:51 +07:00 committed by GitHub
parent 59b41e4120
commit eeed37db4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 58 deletions

View File

@ -938,7 +938,6 @@ void R_RenderPlayerView (player_t* player)
R_RenderBSPNode (numnodes-1);
R_NearbySprites ();
VX_NearbySprites ();
// [FG] update automap while playing
if (automap_on)

View File

@ -317,7 +317,6 @@ void VX_Init (void)
#define VX_MINZ ( 4 * FRACUNIT)
#define VX_MAX_DIST (2048 * FRACUNIT)
#define VX_MIN_DIST ( 512 * FRACUNIT)
#define VX_NEAR_RADIUS ( 512 * FRACUNIT)
static int vx_max_dist = VX_MAX_DIST;
@ -1069,57 +1068,3 @@ void VX_DrawVoxel (vissprite_t * spr)
VX_RecursiveDraw (spr, 0, 0, v->x_size, v->y_size);
}
//------------------------------------------------------------------------
static boolean VX_CheckBBox (fixed_t * bspcoord)
{
if (bspcoord[BOXRIGHT] <= viewx - VX_NEAR_RADIUS) return false;
if (bspcoord[BOXLEFT] >= viewx + VX_NEAR_RADIUS) return false;
if (bspcoord[BOXTOP] <= viewy - VX_NEAR_RADIUS) return false;
if (bspcoord[BOXBOTTOM] >= viewy + VX_NEAR_RADIUS) return false;
return true;
}
static void VX_SpritesInNode (int bspnum)
{
for (;;)
{
if (bspnum & NF_SUBSECTOR)
{
subsector_t * sub = &subsectors[bspnum & ~NF_SUBSECTOR];
R_AddSprites (sub->sector, sub->sector->lightlevel);
return;
}
node_t * bsp = &nodes[bspnum];
// divide the front space
if (VX_CheckBBox (bsp->bbox[0]))
VX_SpritesInNode (bsp->children[0]);
// divide the back space
if (VX_CheckBBox (bsp->bbox[1]))
bspnum = bsp->children[1];
else
break;
}
}
//
// add sprites from nearby sectors which were missed during the
// normal BSP traversal. this ensures that voxel models do not
// suddenly disappear when they are in a small sector which has
// gone out of view.
//
void VX_NearbySprites (void)
{
if (!STRICTMODE(voxels_rendering))
return;
if (numnodes > 0)
VX_SpritesInNode (numnodes - 1);
}

View File

@ -21,8 +21,6 @@ void VX_Init (void);
void VX_ClearVoxels (void);
void VX_NearbySprites (void);
struct mobj_s;
boolean VX_ProjectVoxel (struct mobj_s * thing);