Skip to content

Commit

Permalink
client: clean code for already applied fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0lvin committed Sep 7, 2024
1 parent 0d34018 commit 38e4c4f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/client/cl_entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@ CL_CalcViewValues(void)
{
cl.refdef.blend[i] = ps->blend[i];
}

/* add the weapon */
CL_AddViewWeapon(ps, ops);
}

/*
Expand Down
21 changes: 21 additions & 0 deletions src/client/cl_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ CL_ParseEntityBits(unsigned *bits)
{
number = MSG_ReadShort(&net_message);
}

else
{
number = MSG_ReadByte(&net_message);
Expand Down Expand Up @@ -742,6 +743,26 @@ static void
CL_FireEntityEvents(frame_t *frame)
{
// TODO: Rewrite?
/*
entity_state_t *s1;
int pnum, num;
for (pnum = 0; pnum < frame->num_entities; pnum++)
{
num = (frame->parse_entities + pnum) & (MAX_PARSE_ENTITIES - 1);
s1 = &cl_parse_entities[num];
if (s1->event)
{
CL_EntityEvent(s1);
}
if (s1->effects & EF_TELEPORTER)
{
CL_TeleporterParticles(s1);
}
}
*/
}

void
Expand Down
7 changes: 5 additions & 2 deletions src/client/cl_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ V_AddParticle(vec3_t org, unsigned int color, float alpha)

p = &r_particles[r_numparticles++];
VectorCopy(org, p->origin);
// p->color = color;
// p->alpha = alpha;
p->color = color;
p->alpha = alpha;
}

void
Expand Down Expand Up @@ -600,6 +600,9 @@ V_RenderView(float stereo_separation)
v_forward, etc. */
CL_AddEntities();

// before changing viewport we should trace the crosshair position
V_Render3dCrosshair();

if (cl_testparticles->value)
{
V_TestParticles();
Expand Down

0 comments on commit 38e4c4f

Please sign in to comment.