Small tweeks

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1141 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-07-09 15:47:20 +00:00
parent badc9d1934
commit 83bf982654
9 changed files with 32 additions and 9 deletions

View file

@ -879,6 +879,7 @@ void Validation_FilesModified (void);
void Validation_Skins(void); void Validation_Skins(void);
void Validation_CheckIfResponse(char *text); void Validation_CheckIfResponse(char *text);
void InitValidation(void); void InitValidation(void);
void Validation_IncludeFile(char *filename, char *file, int filelen);
extern qboolean f_modified_particles; extern qboolean f_modified_particles;
extern qboolean care_f_modified; extern qboolean care_f_modified;

View file

@ -245,9 +245,6 @@ extern qboolean isDedicated;
#endif #endif
void Validation_IncludeFile(char *filename, char *file, int filelen);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -157,6 +157,7 @@ void R_RenderDlights (void)
{ {
int i; int i;
dlight_t *l; dlight_t *l;
vec3_t waste1, waste2;
if (!r_flashblend.value) if (!r_flashblend.value)
return; return;
@ -169,14 +170,32 @@ void R_RenderDlights (void)
qglEnable (GL_BLEND); qglEnable (GL_BLEND);
qglBlendFunc (GL_ONE, GL_ONE); qglBlendFunc (GL_ONE, GL_ONE);
if (r_flashblend.value == 2)
{
qglDisable(GL_DEPTH_TEST);
qglDepthMask(0);
}
l = cl_dlights; l = cl_dlights;
for (i=0 ; i<MAX_DLIGHTS ; i++, l++) for (i=0 ; i<MAX_DLIGHTS ; i++, l++)
{ {
if (!l->radius || l->noflash) if (!l->radius || l->noflash)
continue; continue;
if (r_flashblend.value == 2)
{
if (TraceLineN(r_refdef.vieworg, l->origin, waste1, waste2))
continue;
}
R_RenderDlight (l); R_RenderDlight (l);
} }
if (r_flashblend.value == 2)
{
qglEnable(GL_DEPTH_TEST);
qglDepthMask(1);
}
qglColor3f (1,1,1); qglColor3f (1,1,1);
qglDisable (GL_BLEND); qglDisable (GL_BLEND);
qglEnable (GL_TEXTURE_2D); qglEnable (GL_TEXTURE_2D);

View file

@ -2107,8 +2107,8 @@ void GLR_RenderView (void)
// render normal view // render normal view
R_RenderScene (); R_RenderScene ();
GLR_DrawViewModel (); GLR_DrawViewModel ();
// GLR_DrawWaterSurfaces (); GLR_DrawWaterSurfaces ();
// GLR_DrawAlphaSurfaces (); GLR_DrawAlphaSurfaces ();
// render mirror view // render mirror view
R_Mirror (); R_Mirror ();

View file

@ -2064,6 +2064,12 @@ void GLR_DrawWaterSurfaces (void)
qglColor4f (1,1,1,r_wateralphaval); qglColor4f (1,1,1,r_wateralphaval);
GL_TexEnv(GL_MODULATE); GL_TexEnv(GL_MODULATE);
} }
else
{
qglDisable (GL_BLEND);
qglDisable (GL_ALPHA_TEST);
GL_TexEnv(GL_REPLACE);
}
for (i=0 ; i<cl.worldmodel->numtextures ; i++) for (i=0 ; i<cl.worldmodel->numtextures ; i++)
{ {

View file

@ -133,10 +133,10 @@ void EmitWaterPolys (msurface_t *fa, float basealpha)
} }
else //dull (fast) single player else //dull (fast) single player
{ {
qglColor4f(1, 1, 1, 1);
qglMatrixMode(GL_TEXTURE); qglMatrixMode(GL_TEXTURE);
qglPushMatrix(); qglPushMatrix();
qglTranslatef (sin(cl.time) * 0.4f, cos(cl.time) * 0.06f, 0); 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); GL_DrawAliasMesh(fa->mesh, fa->texinfo->texture->gl_texturenum);
qglPopMatrix(); qglPopMatrix();
qglMatrixMode(GL_MODELVIEW); qglMatrixMode(GL_MODELVIEW);

View file

@ -1119,7 +1119,7 @@ void NPP_QWWriteFloat(int dest, float data) //replacement write func (nq to qw)
{ {
union { union {
qbyte b[4]; qbyte b[4];
short f; float f;
} u; } u;
u.f = LittleFloat(data); u.f = LittleFloat(data);
NPP_QWWriteByte(dest, u.b[0]); NPP_QWWriteByte(dest, u.b[0]);

View file

@ -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_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. //some of these are overkill yes, but they are all derived from the fteextensions flags and document the underlaying protocol available.

View file

@ -1429,7 +1429,7 @@ void SV_ClipMoveToEntities ( moveclip_t *clip )
int headnode; int headnode;
float *angles; 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 num = SV_AreaEdicts (clip->boxmins, clip->boxmaxs, touchlist
, MAX_EDICTS, AREA_SOLID); , MAX_EDICTS, AREA_SOLID);