Fix aimsnap, point change causing incorrect color

This commit is contained in:
Ryan Baldwin 2022-08-19 23:43:31 -07:00
parent f4528b18be
commit e1ea8dfcfa
8 changed files with 33 additions and 3 deletions

View File

@ -103,8 +103,8 @@ COMMON_OBJS = chase.c \
snd_ctr.c \ snd_ctr.c \
in_null.c \ in_null.c \
cd_null.c \ cd_null.c \
gl_decal.c \
gl_qmb.c \ gl_qmb.c \
gl_decal.c \
gl_draw.c \ gl_draw.c \
gl_fog.c \ gl_fog.c \
gl_mesh.c \ gl_mesh.c \

Binary file not shown.

Binary file not shown.

View File

@ -522,13 +522,13 @@ void CL_SendMove (usercmd_t *cmd)
{ {
if(!zoom_snap) if(!zoom_snap)
{ {
CL_Aim_Snap(); CL_Aim_Snap();
zoom_snap = 1; zoom_snap = 1;
} }
} }
else else {
zoom_snap = 0; zoom_snap = 0;
}
//==== Sniper Scope Swaying ==== //==== Sniper Scope Swaying ====
if(cl.stats[STAT_ZOOM] == 2) if(cl.stats[STAT_ZOOM] == 2)

View File

@ -945,6 +945,7 @@ void CL_Init (void)
Cvar_RegisterVariable (&sensitivity); Cvar_RegisterVariable (&sensitivity);
Cvar_RegisterVariable (&in_tolerance); Cvar_RegisterVariable (&in_tolerance);
Cvar_RegisterVariable (&in_acceleration); Cvar_RegisterVariable (&in_acceleration);
Cvar_RegisterVariable (&in_aimassist);
Cvar_RegisterVariable (&m_pitch); Cvar_RegisterVariable (&m_pitch);
Cvar_RegisterVariable (&m_yaw); Cvar_RegisterVariable (&m_yaw);

View File

@ -85,6 +85,8 @@ void CL_ParseBeam (model_t *m)
Con_Printf ("beam list overflow!\n"); Con_Printf ("beam list overflow!\n");
} }
extern int decal_mark;
/* /*
================= =================
CL_ParseTEnt CL_ParseTEnt
@ -139,6 +141,12 @@ void CL_ParseTEnt (void)
pos[0] = MSG_ReadCoord (); pos[0] = MSG_ReadCoord ();
pos[1] = MSG_ReadCoord (); pos[1] = MSG_ReadCoord ();
pos[2] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord ();
//R00k--start
if (r_decal_bullets.value)
{
R_SpawnDecalStatic(pos, decal_mark, 8);
}
//R00k--end
R_RunParticleEffect (pos, vec3_origin, 0, 20); R_RunParticleEffect (pos, vec3_origin, 0, 20);
break; break;

View File

@ -542,6 +542,7 @@ void Draw_CharacterRGBA(int x, int y, int num, float r, float g, float b, float
glTexCoord2f (fcol, frow + (float)(size/(float)scale)); glTexCoord2f (fcol, frow + (float)(size/(float)scale));
glVertex2f (x, y+(8*(scale))); glVertex2f (x, y+(8*(scale)));
glEnd (); glEnd ();
glColor4f(1,1,1,1);
glDisable(GL_ALPHA_TEST); glDisable(GL_ALPHA_TEST);
} }

View File

@ -23,6 +23,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern cvar_t r_flatlightstyles; extern cvar_t r_flatlightstyles;
int decal_blood1, decal_blood2, decal_blood3, decal_q3blood, decal_burn, decal_mark, decal_glow;
/*
==================
R_InitOtherTextures
==================
*/
void R_InitOtherTextures (void)
{
//static decals
decal_blood1 = loadtextureimage ("textures/decals/blood_splat01", 0, 0, qfalse, qtrue);
decal_blood2 = loadtextureimage ("textures/decals/blood_splat02", 0, 0, qfalse, qtrue);
decal_blood3 = loadtextureimage ("textures/decals/blood_splat03", 0, 0, qfalse, qtrue);
decal_q3blood = loadtextureimage ("textures/decals/blood_stain", 0, 0, qfalse, qtrue);
decal_burn = loadtextureimage ("textures/decals/explo_burn01", 0, 0, qfalse, qtrue);
decal_mark = loadtextureimage ("textures/decals/particle_burn01", 0, 0, qfalse, qtrue);
decal_glow = loadtextureimage ("textures/decals/glow2", 0, 0, qfalse, qtrue);
}
/* /*
================== ==================
R_InitTextures R_InitTextures
@ -233,6 +252,7 @@ void R_Init (void)
Cvar_RegisterVariable (&r_flatlightstyles); Cvar_RegisterVariable (&r_flatlightstyles);
R_InitParticles (); R_InitParticles ();
R_InitOtherTextures ();
R_InitParticleTexture (); R_InitParticleTexture ();
Fog_Init (); Fog_Init ();