diff --git a/engine/client/client.h b/engine/client/client.h index 2ca7ae58f..c32e78333 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -879,6 +879,7 @@ void Validation_FilesModified (void); void Validation_Skins(void); void Validation_CheckIfResponse(char *text); void InitValidation(void); +void Validation_IncludeFile(char *filename, char *file, int filelen); extern qboolean f_modified_particles; extern qboolean care_f_modified; diff --git a/engine/client/quakedef.h b/engine/client/quakedef.h index 9b91a167c..7e2b9fae2 100644 --- a/engine/client/quakedef.h +++ b/engine/client/quakedef.h @@ -245,9 +245,6 @@ extern qboolean isDedicated; #endif -void Validation_IncludeFile(char *filename, char *file, int filelen); - - #ifdef __cplusplus } diff --git a/engine/gl/gl_rlight.c b/engine/gl/gl_rlight.c index a44cf9f1a..17c99e10f 100644 --- a/engine/gl/gl_rlight.c +++ b/engine/gl/gl_rlight.c @@ -157,6 +157,7 @@ void R_RenderDlights (void) { int i; dlight_t *l; + vec3_t waste1, waste2; if (!r_flashblend.value) return; @@ -169,14 +170,32 @@ void R_RenderDlights (void) qglEnable (GL_BLEND); qglBlendFunc (GL_ONE, GL_ONE); + if (r_flashblend.value == 2) + { + qglDisable(GL_DEPTH_TEST); + qglDepthMask(0); + } + l = cl_dlights; for (i=0 ; iradius || l->noflash) continue; + + if (r_flashblend.value == 2) + { + if (TraceLineN(r_refdef.vieworg, l->origin, waste1, waste2)) + continue; + } R_RenderDlight (l); } + if (r_flashblend.value == 2) + { + qglEnable(GL_DEPTH_TEST); + qglDepthMask(1); + } + qglColor3f (1,1,1); qglDisable (GL_BLEND); qglEnable (GL_TEXTURE_2D); diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 2d92e42b9..09f841b4f 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -2107,8 +2107,8 @@ void GLR_RenderView (void) // render normal view R_RenderScene (); GLR_DrawViewModel (); -// GLR_DrawWaterSurfaces (); -// GLR_DrawAlphaSurfaces (); + GLR_DrawWaterSurfaces (); + GLR_DrawAlphaSurfaces (); // render mirror view R_Mirror (); diff --git a/engine/gl/gl_rsurf.c b/engine/gl/gl_rsurf.c index d1b7947d3..fd00503e0 100644 --- a/engine/gl/gl_rsurf.c +++ b/engine/gl/gl_rsurf.c @@ -2064,6 +2064,12 @@ void GLR_DrawWaterSurfaces (void) qglColor4f (1,1,1,r_wateralphaval); GL_TexEnv(GL_MODULATE); } + else + { + qglDisable (GL_BLEND); + qglDisable (GL_ALPHA_TEST); + GL_TexEnv(GL_REPLACE); + } for (i=0 ; inumtextures ; i++) { diff --git a/engine/gl/gl_warp.c b/engine/gl/gl_warp.c index da26b9e30..8c53d0eb8 100644 --- a/engine/gl/gl_warp.c +++ b/engine/gl/gl_warp.c @@ -133,10 +133,10 @@ void EmitWaterPolys (msurface_t *fa, float basealpha) } else //dull (fast) single player { - qglColor4f(1, 1, 1, 1); qglMatrixMode(GL_TEXTURE); qglPushMatrix(); qglTranslatef (sin(cl.time) * 0.4f, cos(cl.time) * 0.06f, 0); + fa->mesh->colors_array = NULL; GL_DrawAliasMesh(fa->mesh, fa->texinfo->texture->gl_texturenum); qglPopMatrix(); qglMatrixMode(GL_MODELVIEW); diff --git a/engine/server/net_preparse.c b/engine/server/net_preparse.c index 552ead350..62d452516 100644 --- a/engine/server/net_preparse.c +++ b/engine/server/net_preparse.c @@ -1119,7 +1119,7 @@ void NPP_QWWriteFloat(int dest, float data) //replacement write func (nq to qw) { union { qbyte b[4]; - short f; + float f; } u; u.f = LittleFloat(data); NPP_QWWriteByte(dest, u.b[0]); diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index df870f53d..d523112f1 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -6129,7 +6129,7 @@ lh_extension_t QSG_Extensions[] = { // {"ZQ_QC_PARTICLE"}, //particle builtin works in QW ( we don't mimic ZQ fully though) - {"ZQ_QC_STRINGS", 11, NULL, {"stof", "strlen","strcat","substring","stov","strzone","strunzone"}} + {"ZQ_QC_STRINGS", 11, NULL, {"stof", "strlen","strcat","substring","stov","strzone","strunzone"}} //a trimmed down FRIK_FILE. }; //some of these are overkill yes, but they are all derived from the fteextensions flags and document the underlaying protocol available. diff --git a/engine/server/world.c b/engine/server/world.c index b1ea15a45..13fe5ea7c 100644 --- a/engine/server/world.c +++ b/engine/server/world.c @@ -1429,7 +1429,7 @@ void SV_ClipMoveToEntities ( moveclip_t *clip ) int headnode; float *angles; - int passed = clip->passedict?EDICT_TO_PROG(svprogfuncs, clip->passedict):NULL; + int passed = clip->passedict?EDICT_TO_PROG(svprogfuncs, clip->passedict):0; num = SV_AreaEdicts (clip->boxmins, clip->boxmaxs, touchlist , MAX_EDICTS, AREA_SOLID);