minor whitespace/style tidy-up.

This commit is contained in:
Ozkan Sezer 2022-09-05 23:56:40 +03:00
parent dd8439b767
commit 33c00bf0db
4 changed files with 14 additions and 16 deletions

View file

@ -59,28 +59,27 @@ static efrag_t *R_GetEfrag (void)
// we could just Hunk_Alloc a single efrag_t and return it, but since // we could just Hunk_Alloc a single efrag_t and return it, but since
// the struct is so small (2 pointers) allocate groups of them // the struct is so small (2 pointers) allocate groups of them
// to avoid wasting too much space on the hunk allocation headers. // to avoid wasting too much space on the hunk allocation headers.
if (cl.free_efrags) if (cl.free_efrags)
{ {
efrag_t *ef = cl.free_efrags; efrag_t *ef = cl.free_efrags;
cl.free_efrags = ef->leafnext; cl.free_efrags = ef->leafnext;
ef->leafnext = NULL; ef->leafnext = NULL;
cl.num_efrags++; cl.num_efrags++;
return ef; return ef;
} }
else else
{ {
int i; int i;
cl.free_efrags = (efrag_t *) Hunk_AllocName (EXTRA_EFRAGS * sizeof (efrag_t), "efrags"); cl.free_efrags = (efrag_t *) Hunk_AllocName (EXTRA_EFRAGS * sizeof (efrag_t), "efrags");
for (i = 0; i < EXTRA_EFRAGS - 1; i++) for (i = 0; i < EXTRA_EFRAGS - 1; i++)
cl.free_efrags[i].leafnext = &cl.free_efrags[i + 1]; cl.free_efrags[i].leafnext = &cl.free_efrags[i + 1];
cl.free_efrags[i].leafnext = NULL; cl.free_efrags[i].leafnext = NULL;
// call recursively to get a newly allocated free efrag // call recursively to get a newly allocated free efrag
return R_GetEfrag (); return R_GetEfrag ();
} }
@ -112,11 +111,11 @@ void R_SplitEntityOnNode (mnode_t *node)
leaf = (mleaf_t *)node; leaf = (mleaf_t *)node;
// grab an efrag off the free list // grab an efrag off the free list
ef = R_GetEfrag(); ef = R_GetEfrag();
ef->entity = r_addent; ef->entity = r_addent;
// set the leaf links // set the leaf links
ef->leafnext = leaf->efrags; ef->leafnext = leaf->efrags;
leaf->efrags = ef; leaf->efrags = ef;
@ -169,7 +168,7 @@ R_AddEfrags
void R_AddEfrags (entity_t *ent) void R_AddEfrags (entity_t *ent)
{ {
qmodel_t *entmodel; qmodel_t *entmodel;
vec_t scalefactor; vec_t scalefactor;
if (!ent->model) if (!ent->model)
return; return;

View file

@ -47,7 +47,7 @@ typedef struct edict_s
entity_state_t baseline; entity_state_t baseline;
unsigned char alpha; /* johnfitz -- hack to support alpha since it's not part of entvars_t */ unsigned char alpha; /* johnfitz -- hack to support alpha since it's not part of entvars_t */
unsigned char scale; unsigned char scale; /* Quakespasm: added for model scale support. */
qboolean sendinterval; /* johnfitz -- send time until nextthink to client for better lerp timing */ qboolean sendinterval; /* johnfitz -- send time until nextthink to client for better lerp timing */
float freetime; /* sv.time when the object was freed */ float freetime; /* sv.time when the object was freed */

View file

@ -262,7 +262,7 @@ typedef struct
unsigned char colormap; //johnfitz -- was int unsigned char colormap; //johnfitz -- was int
unsigned char skin; //johnfitz -- was int unsigned char skin; //johnfitz -- was int
unsigned char alpha; //johnfitz -- added unsigned char alpha; //johnfitz -- added
unsigned char scale; unsigned char scale; //Quakespasm: for model scale support.
int effects; int effects;
} entity_state_t; } entity_state_t;
@ -277,4 +277,3 @@ typedef struct
} usercmd_t; } usercmd_t;
#endif /* _QUAKE_PROTOCOL_H */ #endif /* _QUAKE_PROTOCOL_H */

View file

@ -542,10 +542,10 @@ void V_PolyBlend (void)
glEnable (GL_BLEND); glEnable (GL_BLEND);
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity (); glLoadIdentity ();
glOrtho (0, 1, 1, 0, -99999, 99999); glOrtho (0, 1, 1, 0, -99999, 99999);
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glLoadIdentity (); glLoadIdentity ();
glColor4fv (v_blend); glColor4fv (v_blend);
@ -962,7 +962,7 @@ void V_Init (void)
Cvar_RegisterVariable (&v_kickroll); Cvar_RegisterVariable (&v_kickroll);
Cvar_RegisterVariable (&v_kickpitch); Cvar_RegisterVariable (&v_kickpitch);
Cvar_RegisterVariable (&v_gunkick); //johnfitz Cvar_RegisterVariable (&v_gunkick); //johnfitz
Cvar_RegisterVariable (&r_viewmodel_quake); //MarkV Cvar_RegisterVariable (&r_viewmodel_quake); //MarkV
} }