ref: use designated initializers where possible

This commit is contained in:
Alibek Omarov
2026-05-20 12:44:47 -04:00
committed by a1batross
parent 1fed340330
commit 64b1b54f5b
2 changed files with 11 additions and 29 deletions

View File

@@ -966,9 +966,11 @@ void R_DrawAliasModel( cl_entity_t *e )
// //
// get lighting information // get lighting information
// //
alight_t lighting;
vec3_t dir; vec3_t dir;
lighting.plightvec = dir; alight_t lighting =
{
.plightvec = dir,
};
R_EntityDynamicLight( e, &lighting, FBitSet( RI.rvp.flags, RF_DRAW_WORLD ), g_alias.time, g_alias.lightspot, g_alias.lightvec ); R_EntityDynamicLight( e, &lighting, FBitSet( RI.rvp.flags, RF_DRAW_WORLD ), g_alias.time, g_alias.lightspot, g_alias.lightvec );
r_stats.c_alias_polys += m_pAliasHeader->numtris; r_stats.c_alias_polys += m_pAliasHeader->numtris;

View File

@@ -265,8 +265,6 @@ R_SetupFrame
*/ */
void R_SetupFrameQ( void ) void R_SetupFrameQ( void )
{ {
vrect_t vrect;
if( r_fullbright->flags & FCVAR_CHANGED ) if( r_fullbright->flags & FCVAR_CHANGED )
{ {
r_fullbright->flags &= ~FCVAR_CHANGED; r_fullbright->flags &= ~FCVAR_CHANGED;
@@ -275,12 +273,9 @@ void R_SetupFrameQ( void )
// tr.framecount++; // tr.framecount++;
// build the transformation matrix for the given view angles // build the transformation matrix for the given view angles
VectorCopy( RI.rvp.vieworigin, tr.modelorg ); VectorCopy( RI.rvp.vieworigin, tr.modelorg );
// AngleVectors (RI.rvp.viewangles, RI.vforward, RI.vright, RI.vup);
// current viewleaf // current viewleaf
if( FBitSet( RI.rvp.flags, RF_DRAW_WORLD )) if( FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
{ {
@@ -288,18 +283,13 @@ void R_SetupFrameQ( void )
r_viewcluster = RI.viewleaf->cluster; r_viewcluster = RI.viewleaf->cluster;
} }
// if (sw_waterwarp->value && (r_newrefdef.rdflags & RDF_UNDERWATER) ) vrect_t vrect =
// r_dowarp = true; {
// else .x = RI.rvp.viewport[0],
.y = RI.rvp.viewport[1],
/*vrect.x = 0;//r_newrefdef.x; .width = RI.rvp.viewport[2],
vrect.y = 0;//r_newrefdef.y; .height = RI.rvp.viewport[3],
vrect.width = gpGlobals->width; };
vrect.height = gpGlobals->height;*/
vrect.x = RI.rvp.viewport[0];
vrect.y = RI.rvp.viewport[1];
vrect.width = RI.rvp.viewport[2];
vrect.height = RI.rvp.viewport[3];
d_viewbuffer = (void *)vid.buffer; d_viewbuffer = (void *)vid.buffer;
r_screenwidth = vid.rowbytes; r_screenwidth = vid.rowbytes;
@@ -315,16 +305,6 @@ void R_SetupFrameQ( void )
VectorCopy( RI.vright, RI.base_vright ); VectorCopy( RI.vright, RI.base_vright );
VectorCopy( RI.vup, RI.base_vup ); VectorCopy( RI.vup, RI.base_vup );
// clear frame counts
/* c_faceclip = 0;
d_spanpixcount = 0;
r_polycount = 0;
r_drawnpolycount = 0;
r_wholepolycount = 0;
r_amodels_drawn = 0;
r_outofsurfaces = 0;
r_outofedges = 0;*/
// d_setup // d_setup
d_roverwrapped = false; d_roverwrapped = false;
d_initial_rover = sc_rover; d_initial_rover = sc_rover;