From 4bf80db50d4e5d93e9b53e919550a5ccdaf1cbb1 Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Wed, 18 Jan 2023 16:52:39 -0500 Subject: [PATCH] Misc. Engine fixes for Quakespasm --- source/gl_fog.c | 8 ++++---- source/r_alias.c | 8 ++++---- source/sv_phys.c.bak | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/gl_fog.c b/source/gl_fog.c index 58bb39b..656cc8c 100644 --- a/source/gl_fog.c +++ b/source/gl_fog.c @@ -296,8 +296,8 @@ float *Fog_GetColor (void) } //find closest 24-bit RGB value, so solid-colored sky can match the fog perfectly - //for (i=0;i<3;i++) - //c[i] = (float)(Q_rint(c[i] * 255)) / 255.0f; + for (i=0;i<3;i++) + c[i] = (float)(Q_rint(c[i] * 255)) / 255.0f; //#endif return c; } @@ -365,6 +365,8 @@ void Fog_SetupFrame (void) glFogfv(GL_FOG_COLOR, Fog_GetColor()); glFogf(GL_FOG_DENSITY, fog_density_gl); + glFogf(GL_FOG_START, fog_start); + glFogf(GL_FOG_END, fog_end); //glFogf(GL_FOG_COLOR, *c); //if(s == 0 || e < 0) @@ -459,8 +461,6 @@ called after drawing stuff that is additive blended -- restores fog color */ void Fog_StopAdditive (void) { - vec3_t color = {0,0,0}; - if (Fog_GetDensity() > 0) glFogfv(GL_FOG_COLOR, Fog_GetColor()); } diff --git a/source/r_alias.c b/source/r_alias.c index 319056e..f5ff54f 100644 --- a/source/r_alias.c +++ b/source/r_alias.c @@ -291,10 +291,10 @@ void GLAlias_CreateShaders (void) blendLoc = GL_GetUniformLocation (&r_alias_program, "Blend"); shadevectorLoc = GL_GetUniformLocation (&r_alias_program, "ShadeVector"); lightColorLoc = GL_GetUniformLocation (&r_alias_program, "LightColor"); -#ifndef VITA +//#ifndef VITA texLoc = GL_GetUniformLocation (&r_alias_program, "Tex"); fullbrightTexLoc = GL_GetUniformLocation (&r_alias_program, "FullbrightTex"); -#endif +//#endif useFullbrightTexLoc = GL_GetUniformLocation (&r_alias_program, "UseFullbrightTex"); useOverbrightLoc = GL_GetUniformLocation (&r_alias_program, "UseOverbright"); useAlphaTestLoc = GL_GetUniformLocation (&r_alias_program, "UseAlphaTest"); @@ -354,10 +354,10 @@ void GL_DrawAliasFrame_GLSL (aliashdr_t *paliashdr, lerpdata_t lerpdata, gltextu GL_Uniform1fFunc (blendLoc, blend); GL_Uniform3fFunc (shadevectorLoc, shadevector[0], shadevector[1], shadevector[2]); GL_Uniform4fFunc (lightColorLoc, lightcolor[0], lightcolor[1], lightcolor[2], entalpha); -#ifndef VITA +//#ifndef VITA GL_Uniform1iFunc (texLoc, 0); GL_Uniform1iFunc (fullbrightTexLoc, 1); -#endif +//#endif GL_Uniform1iFunc (useFullbrightTexLoc, (fb != NULL) ? 1 : 0); GL_Uniform1fFunc (useOverbrightLoc, overbright ? 1 : 0); GL_Uniform1iFunc (useAlphaTestLoc, (currententity->model->flags & MF_HOLEY) ? 1 : 0); diff --git a/source/sv_phys.c.bak b/source/sv_phys.c.bak index 77d0eb2..8d222e8 100644 --- a/source/sv_phys.c.bak +++ b/source/sv_phys.c.bak @@ -1676,11 +1676,11 @@ void SV_Physics (void) // ent = sv.edicts; - if (sv_freezenonclients.value) +/* if (sv_freezenonclients.value) entity_cap = svs.maxclients + 1; // Only run physics on clients and the world else entity_cap = sv.num_edicts; - +*/ for (i=0 ; i