]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
added newmap function to render modules (so explosions and other things are reset...
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Apr 2001 15:48:49 +0000 (15:48 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Apr 2001 15:48:49 +0000 (15:48 +0000)
CL_AllocDlight redesigned (takes all settings for dlight on parameter line)
dlights now use a pointer to their owner entity instead of a key number
light emitting entities now glow properly (directional lighting disabled on the entity that owns the dlight)
cl_shownet no longer spews empty lines when recieving less updates from server than client framerate
some whitespace cleanup
fixed some missing parentheses on a condition in R_BuildLightmap (mixed &&, &, and ||, eek)
fixed vertex array problems with fog sky
increased MAX_TRANSPOLYS from 8192 to 65536
added a general purpose decal engine, superior to the decal particles (lower CPU use, better lighting)
added bullet hole decals and bullet hole texture generator
added r_speeds2 time reporting for moveexplosions, drawexplosions, and drawdecals
cleaned up dlight logic, all code now relies on radius, which is cleared when the dlight dies, this removed all potential flickering problems and offers a minor speedup
optimized R_ResampleTexture further to improve load times
moved heap size commandline parameter stuff from platform specific startup code to Host_Init, now all platforms understand -mem, -winmem, and -heapsize
WAD3 texture transparency now supported again
r_explosionclip cvar is now saved to config
r_drawexplosions cvar added
r_particles cvar is now saved to config
r_dynamicparticles cvar renamed to r_particles_lighting
r_particles_bloodshowers cvar added to disable blood shower effects
r_particles_blood cvar added to disable blood effects
r_particles_smoke cvar added to disable smoke effects
r_particles_sparks cvar added to disable spark effects
r_particles_bubbles cvar added to disable bubble effects
fixed smoke texture problem (0 alpha-noise portions were not written to texture, leaving portions of previous texture in buffer)
changed nearly every particle effect to look better and use less particles and fillrate, major speed gains resulted
blood particles no longer fade inflight as it made the effects less impressive and resulted in a lot of mostly transparent decals
major particle size bug fixed, all view aligned particles (everything but rain and decals) were 50% larger than they were supposed to be
particles now use transpolyvertub (unsigned byte colors) instead of transpolyvert for a speedup

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@190 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c

index d363dc2097e1653af1eb7e54588a3d993c12a838..9031969f8c27bc30ccd493922145779fb7d22c32 100644 (file)
@@ -54,8 +54,6 @@ cvar_t r_dlightmap = {"r_dlightmap", "1"};
 qboolean lightmaprgba, nosubimagefragments, nosubimage, skyisvisible;
 int lightmapbytes;
 
-extern int r_dlightframecount;
-
 void gl_surf_start()
 {
 }
@@ -64,6 +62,10 @@ void gl_surf_shutdown()
 {
 }
 
+void gl_surf_newmap()
+{
+}
+
 void GL_Surf_Init()
 {
        int i;
@@ -80,7 +82,7 @@ void GL_Surf_Init()
        Cvar_RegisterVariable(&r_oldclip);
        Cvar_RegisterVariable(&r_dlightmap);
 
-       R_RegisterModule("GL_Surf", gl_surf_start, gl_surf_shutdown);
+       R_RegisterModule("GL_Surf", gl_surf_start, gl_surf_shutdown, gl_surf_newmap);
 }
 
 int         dlightdivtable[32768];
@@ -278,7 +280,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
        lightmap = surf->samples;
 
 // set to full bright if no light data
-       if ((currententity && currententity->effects & EF_FULLBRIGHT) || !cl.worldmodel->lightdata)
+       if ((currententity && (currententity->effects & EF_FULLBRIGHT)) || !cl.worldmodel->lightdata)
        {
                bl = blocklights;
                for (i=0 ; i<size ; i++)
@@ -774,7 +776,6 @@ void RSurf_DrawWall(msurface_t *s, texture_t *t, int transform)
 }
 
 // LordHavoc: transparent brush models
-extern int r_dlightframecount;
 extern float modelalpha;
 
 void RSurf_DrawWallVertex(msurface_t *s, texture_t *t, int transform, int isbmodel)
@@ -973,7 +974,7 @@ void R_DrawBrushModel (entity_t *e)
 // instanced model
        for (i = 0;i < MAX_DLIGHTS;i++)
        {
-               if ((cl_dlights[i].die < cl.time) || (!cl_dlights[i].radius))
+               if (!cl_dlights[i].radius)
                        continue;
 
                VectorSubtract(cl_dlights[i].origin, currententity->origin, org);