divverent/darkplaces.git
16 years agothanks to Tomaz for finding a severe bug in CopyTranslateOnly (it was copying the...
havoc [Mon, 11 Nov 2002 05:04:53 +0000 (05:04 +0000)]
thanks to Tomaz for finding a severe bug in CopyTranslateOnly (it was copying the X translate into all 3 translate components)

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

16 years agoadded Nexiuz TE_ effects (prefixed TE_TEI_) and Nexiuz plasma trail (an override...
havoc [Sun, 10 Nov 2002 05:03:42 +0000 (05:03 +0000)]
added Nexiuz TE_ effects (prefixed TE_TEI_) and Nexiuz plasma trail (an override for EF_BRIGHTFIELD)
Nexiuz mode disables fullbrights
reshaped some of the particle structure (flags is gone, broken apart into separate fields again)
added tex_beam (which uses a separate texture instead of the particle font because it needs to repeat)
simplified some of the texture font generation (tex_ variables now indicate where to put the images in the texture)
now resets trail positions if entity was not active in previous frame
now gives packet dump when Host_Error is called during client message parsing code
now frees the model(s) being loaded when Host_Error is called during model loading code
removed modelflush command because it crashes the realtime lighting code (which points to leafs and surfaces in the world model, a problem which does not exist with r_restart and vid_restart)
R_Stain and R_CalcBeamVerts now use const where appropriate

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

16 years agoadd GAME_NEXIUZ gamemode
havoc [Sun, 10 Nov 2002 02:51:31 +0000 (02:51 +0000)]
add GAME_NEXIUZ gamemode

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

16 years agofixed Mod_LoadZymoticModel - it had TONS of crashs
havoc [Sun, 10 Nov 2002 02:49:45 +0000 (02:49 +0000)]
fixed Mod_LoadZymoticModel - it had TONS of crashs

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

16 years agofix crashs on maps with missing textures
havoc [Sun, 10 Nov 2002 02:34:19 +0000 (02:34 +0000)]
fix crashs on maps with missing textures

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

16 years agofix which crosshair texture is used
havoc [Sun, 10 Nov 2002 02:26:47 +0000 (02:26 +0000)]
fix which crosshair texture is used

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

16 years agodon't send free entities! (I've been observing this bug for months)
havoc [Sun, 10 Nov 2002 02:22:43 +0000 (02:22 +0000)]
don't send free entities!  (I've been observing this bug for months)

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

16 years agoElric's changes:
havoc [Fri, 8 Nov 2002 23:26:54 +0000 (23:26 +0000)]
Elric's changes:
JPEG texture loading using libjpeg (entirely optional at runtime - if not present, it won't load it)
gl_extensionfunctionlist_t is now renamed dllfunction_t and part of a shared system for library opening/function retrieval (functions Sys_LoadLibrary, Sys_GetProcAddress, Sys_UnloadLibrary - for this the library handles are considered void *'s)
LordHavoc's changes:
fixed libjpeg support in non-win32 by using jpeglib.h - honors jpeglib.h's idea of boolean - Linux libjpeg is compiled with boolean as int, unlike windows where it is apparently byte - unfortunately this also means you need libjpeg-devel installed to compile it in non-win32, not sure what can be done about this (but most people seem to have that anyway...)
looks for libjpeg.so.62 instead of libjpeg.so

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

16 years agoglossmap textures are now brighter (no change to forced gloss brightness)
havoc [Thu, 7 Nov 2002 20:50:05 +0000 (20:50 +0000)]
glossmap textures are now brighter (no change to forced gloss brightness)
now clears lights when reloading lights
r_editlights_quakelightsizescale cvar added, default 0.8, controls size of lights imported from maps, gets a major speed gain but makes the map a little darker
R_Shadow_NewWorldLight now checks if radius or color is too dim and won't spawn such lights
in editing mode the centers of lights are visible now (as crosshair images)
light selection is now done a bit differently - the more precisely you point at a light, the higher it's rating gets, sometimes surpassing the closer lights in the area

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

16 years agochanged a server protocol error to use Host_Error
havoc [Thu, 7 Nov 2002 20:42:36 +0000 (20:42 +0000)]
changed a server protocol error to use Host_Error

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

16 years agowhen realtime mode fails now mentions setting vid_bitsperpixel to 32 as well
havoc [Thu, 7 Nov 2002 20:41:50 +0000 (20:41 +0000)]
when realtime mode fails now mentions setting vid_bitsperpixel to 32 as well

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

16 years agoLoadTGA now loads colormapped and greyscale targas (as found in qe1m1 project)
havoc [Thu, 7 Nov 2002 20:40:28 +0000 (20:40 +0000)]
LoadTGA now loads colormapped and greyscale targas (as found in qe1m1 project)

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

16 years agodon't allow stencil without bitsperpixel 32
havoc [Thu, 7 Nov 2002 20:38:57 +0000 (20:38 +0000)]
don't allow stencil without bitsperpixel 32

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

16 years agoadded comments explaining what all the fields of surfmesh_t do
havoc [Mon, 4 Nov 2002 15:56:31 +0000 (15:56 +0000)]
added comments explaining what all the fields of surfmesh_t do

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

16 years agoremoved use of 3D textures
havoc [Mon, 4 Nov 2002 01:28:08 +0000 (01:28 +0000)]
removed use of 3D textures

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

16 years agorenamed r_staticworldlights to r_shadow_staticworldlights
havoc [Mon, 4 Nov 2002 01:23:30 +0000 (01:23 +0000)]
renamed r_staticworldlights to r_shadow_staticworldlights

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

16 years agonow clears stencil to 128 instead of 0, this avoids problems with arbitrary incr...
havoc [Mon, 4 Nov 2002 01:09:33 +0000 (01:09 +0000)]
now clears stencil to 128 instead of 0, this avoids problems with arbitrary incr/decr orders
stencil shadows are now always erased by glClear, never by drawing again, removes r_shadow_erasebydrawing cvar
shadow volumes now have a nudge away from the surface that cast them, this is controlled by the r_shadow_shadownudge cvar (default 1 unit), avoids rare z fighting issues
shadow volume projection distance is now not infinite for alias model volumes, because they are more well-behaved than the world shadows...
msurface_t poly_radius and poly_radius2 removed
now validates elements in more parts of loading (hoped this would reveal a model shadow bug, but it didn't)
Mod_ShadowMesh_AddVertex now uses a hash table search to speed up static shadow volume building (unfortunately this doesn't seem to be the real speed problem)
removed ALLOCMESHINPIECES option from Mod_ShadowMesh code
removed non-PRECOMPUTEDSHADOWVOLUMES option from static shadow volume creation
removed some unused variables

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

16 years agofix polygon distance checks (the radius comparison was completely wrong)
havoc [Sun, 3 Nov 2002 23:10:45 +0000 (23:10 +0000)]
fix polygon distance checks (the radius comparison was completely wrong)

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

16 years agoadded support for glPolygonOffset (not used though)
havoc [Sun, 3 Nov 2002 23:07:26 +0000 (23:07 +0000)]
added support for glPolygonOffset (not used though)

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

16 years agountested support for tenebrae override/ textures directory
havoc [Thu, 31 Oct 2002 15:35:42 +0000 (15:35 +0000)]
untested support for tenebrae override/ textures directory

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

16 years agomake view kicks (both angle and origin) occur before gun is oriented, so it follows...
havoc [Thu, 31 Oct 2002 15:17:40 +0000 (15:17 +0000)]
make view kicks (both angle and origin) occur before gun is oriented, so it follows the view exactly

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

16 years agofixed all the signed/unsigned mismatch warnings
havoc [Wed, 30 Oct 2002 15:28:26 +0000 (15:28 +0000)]
fixed all the signed/unsigned mismatch warnings

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

16 years agocommented out two unused static const int variables gcc 3.3 noticed
havoc [Wed, 30 Oct 2002 15:23:48 +0000 (15:23 +0000)]
commented out two unused static const int variables gcc 3.3 noticed

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

16 years agofix viewmodel crash
havoc [Wed, 30 Oct 2002 11:46:08 +0000 (11:46 +0000)]
fix viewmodel crash

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

16 years agominor update to texture flags and logic stuff
havoc [Tue, 29 Oct 2002 21:06:11 +0000 (21:06 +0000)]
minor update to texture flags and logic stuff

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

16 years agofix for use of cubemaps on hardware without 3d texture support
havoc [Tue, 29 Oct 2002 21:04:07 +0000 (21:04 +0000)]
fix for use of cubemaps on hardware without 3d texture support

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

16 years agoview model is now properly lit in realtime mode
havoc [Tue, 29 Oct 2002 19:29:58 +0000 (19:29 +0000)]
view model is now properly lit in realtime mode

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

16 years agocolor the torch light
havoc [Tue, 29 Oct 2002 18:55:05 +0000 (18:55 +0000)]
color the torch light

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

16 years agotweak large flame lights a bit more
havoc [Tue, 29 Oct 2002 18:36:06 +0000 (18:36 +0000)]
tweak large flame lights a bit more

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

16 years agobumpscale is now adjustable (r_shadow_bumpscale) for experimenting (it's not saved...
havoc [Tue, 29 Oct 2002 18:31:12 +0000 (18:31 +0000)]
bumpscale is now adjustable (r_shadow_bumpscale) for experimenting (it's not saved to config)
.lights loading now has the correct light intensity
torchs now spawn lights above their location so the shadow is cast down, not up

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

16 years agonow lights are automatically loaded from the .bsp, .lights, or .rtlights if available
havoc [Tue, 29 Oct 2002 18:01:43 +0000 (18:01 +0000)]
now lights are automatically loaded from the .bsp, .lights, or .rtlights if available

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

16 years ago* LordHavoc slaps self for having loadmodel->mempool references where he should have...
havoc [Tue, 29 Oct 2002 15:44:15 +0000 (15:44 +0000)]
* LordHavoc slaps self for having loadmodel->mempool references where he should have had r_shadow_mempool references

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

16 years agochanged how QC interpreter handles edict field access - the entvars struct is now...
havoc [Tue, 29 Oct 2002 15:36:49 +0000 (15:36 +0000)]
changed how QC interpreter handles edict field access - the entvars struct is now a pointer - yes this changed that many files...
discovered gcc 2.95.3 is the sole cause of map change crashs in the QC interpreter - it does not compile pr_exec.c correctly somehow (I think OP_ADDRESS is the only place it has a problem), makefile now refers to gcc-3.1 (maybe this should be changed, but oh well for now)

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

16 years agofaster number to edict lookup (sv.edictstable) and faster edict to number lookup...
havoc [Mon, 28 Oct 2002 14:26:49 +0000 (14:26 +0000)]
faster number to edict lookup (sv.edictstable) and faster edict to number lookup (edict_t now has a number inside it)

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

16 years agocheck for negative pr_depth in PR_Crash just to be obsessive
havoc [Mon, 28 Oct 2002 14:24:33 +0000 (14:24 +0000)]
check for negative pr_depth in PR_Crash just to be obsessive

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

16 years agofixed CopyEntity builtin, now only copies the vars (not the physics info and such)
havoc [Mon, 28 Oct 2002 14:23:41 +0000 (14:23 +0000)]
fixed CopyEntity builtin, now only copies the vars (not the physics info and such)

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

16 years agoimplemented scissor rect clipping of lights in realtime lighting mode
havoc [Mon, 28 Oct 2002 09:17:44 +0000 (09:17 +0000)]
implemented scissor rect clipping of lights in realtime lighting mode
DP is no longer fillrate limited on my GF4 at 640x480 :)

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

16 years agogloss now works correctly
havoc [Sun, 27 Oct 2002 13:15:43 +0000 (13:15 +0000)]
gloss now works correctly
major speedups to realtime lighting mode (it's now actually playable on my machine)

world lights are now handled by r_shadow.c instead of the lights list in the world model
world lights can be ingame edited/loaded/saved (the file name ends in .rtlights), this is all controlled by r_editlights* commands/cvars
realtime lighting cvars renamed from r_light_* to r_shadow_*
r_shadow_realtime takes the place of r_shadows modes 2 and 3, mode 1 is realtime lighting, mode 2 is realtime lighting plus visible shadow volumes overlaid
r_shadow_lightingmode variable added (updated each frame) indicating whether or not realtime lighting is active
changed how player model and chase_active is handled (player model is now considered a forced RENDER_EXTERIORMODEL), so player now casts shadows
R_Shadow_Volume no longer takes a vertex parameter, it is implied that it is in varray_vertex (since all the code relied on this fact anyway)
R_Shadow_Volume's code has been split out into reusable functions (R_Shadow_ProjectVertices, R_Shadow_MakeTriangleShadowFlags, R_Shadow_BuildShadowVolumeTriangles)
R_Shadow_RenderLighting split into R_Shadow_DiffuseLighting and R_Shadow_SpecularLighting since sometimes it's usable to use more than one call to diffuse lighting (colormapped models)
R_Model_Alias_DrawLight now handles colormapping
added Light_CullBox and LightAndVis_CullBox functions for culling shadow volumes
R_DrawWorldLightShadowVolume has been moved to r_shadow.c
Mod_ShadowMesh_Begin now takes an initial number of triangles to hold, number of triangles in each additional shadowmesh is now based on previous mesh
R_Model_Brush_DrawLightForSurfaceList added to greatly reduce wasted lighting
rewrote visibility logic in R_Model_Brush_DrawLight, now uses different approachs for bmodels and world
lights are now pvs culled (according to what leafs are visible to the viewer, and what leafs are visible to the light)
R_Shadow_Stage_EraseShadowVolumes now returns an int, indicating whether or not to draw the shadow volumes again to erase
rewrote how texture info based on entity and time is updated (it is now a function called R_UpdateTextureInfo)
fixed a ton of bugs relating to animated textures and transparency of bmodels (also changed texture_t currentframe to no longer be an array)
disabled building of surface neighbors (oh sure I made it a lot faster and stuff, but it's still not practical, and is no longer necessary)
changed parameters of model_t DrawLight function to no longer take distbias and subtract
Mod_ProcessLightList is no longer called
mlight_t fields relating to shadow volumes have been commented out
Mod_ValidateElements function added
notes on enormous cost added to Mod_BuildTextureVectorsAndNormals (188 float operations per triangle, and 39 float operations per vertex)
added (disabled) code for allocating and freeing shadowmeshs in pieces, just for obsessive memory corruption detection (none was found)
Mod_ShadowMesh_AddTriangle and Mod_ShadowMesh_AddMesh functions added, and Mod_ShadowMesh_AddPolygon now uses AddTriangle (this is a slowdown but I'm not sure it matters that it is, it fills out meshs more completely)
added (disabled) code for Mod_ShadowMesh_Finish to work without reallocating meshs
R_Shadow_ResizeTriangleFacingLight and R_Shadow_ResizeShadowElements added
R_Shadow_RenderShadowMeshVolume added (properly renders shadowmesh_t chains, fixing all the bugs with static shadow volume rendering)
r_shadow_blankbumptexture is now 1x1
r_shadow_blankglosstexture and r_shadow_blankwhitetexture added (both 1x1)
added a 4 texture path for r_shadowtexture3d 0 mode
when static shadow volumes are constructed for world lights, it is now done by constructing a combined mesh of all lit geometry, and then casting shadows from that (this reduces shadow volume edges greatly, since separate polygons become a continuous mesh during the mesh creation)

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

16 years agoadded a FIXME note about skyboxes and vid_restart
havoc [Sun, 27 Oct 2002 13:10:42 +0000 (13:10 +0000)]
added a FIXME note about skyboxes and vid_restart

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

16 years agoset depth and stencil clear values
havoc [Sun, 27 Oct 2002 12:13:53 +0000 (12:13 +0000)]
set depth and stencil clear values

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

16 years agocheck for out of bounds fraction
havoc [Sun, 27 Oct 2002 12:11:48 +0000 (12:11 +0000)]
check for out of bounds fraction

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

16 years agoadd an error check for invalid maxfrac before returning it, nothing significant
havoc [Sun, 27 Oct 2002 12:00:37 +0000 (12:00 +0000)]
add an error check for invalid maxfrac before returning it, nothing significant

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

16 years agofix for drawing explosions and sky twice as much as necessary (!), no longer does...
havoc [Sat, 26 Oct 2002 15:23:58 +0000 (15:23 +0000)]
fix for drawing explosions and sky twice as much as necessary (!), no longer does a 360 degree sweep on both axis, one axis is only 180 degrees

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

16 years agofix for lift blocking due to imprecision at very low frame times (slowmo)
havoc [Fri, 25 Oct 2002 12:30:55 +0000 (12:30 +0000)]
fix for lift blocking due to imprecision at very low frame times (slowmo)

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

16 years agominor whitespace cleanup
havoc [Fri, 25 Oct 2002 11:15:08 +0000 (11:15 +0000)]
minor whitespace cleanup

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

16 years agoreworked visibility a bit (added VIS_CullBox and VIS_CullSphere) so it can be pretty...
havoc [Tue, 22 Oct 2002 07:13:13 +0000 (07:13 +0000)]
reworked visibility a bit (added VIS_CullBox and VIS_CullSphere) so it can be pretty accurate
made pvs surface/leaf lists to make R_SurfaceWorldNode as fast as possible
world geometry now casts shadows from frontfaces instead of backfaces
fixed most shadowing bugs
static shadow volumes now work (other than one bug I'm trying to find) and are on by default

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

16 years agoadded a comment describing GL triangle strip order (why add it to this? convenience)
havoc [Tue, 22 Oct 2002 07:10:26 +0000 (07:10 +0000)]
added a comment describing GL triangle strip order (why add it to this?  convenience)

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

16 years agomake profile now works
havoc [Tue, 22 Oct 2002 07:05:24 +0000 (07:05 +0000)]
make profile now works
no longer prints 'Compiling whatever.c' and so on as per Mercury's request

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

16 years agocast shadows from frontfaces instead of backfaces
havoc [Tue, 22 Oct 2002 07:03:44 +0000 (07:03 +0000)]
cast shadows from frontfaces instead of backfaces

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

16 years agodon't use 3d textures on drivers that don't explicitly advertise it as an extension
havoc [Tue, 22 Oct 2002 07:02:47 +0000 (07:02 +0000)]
don't use 3d textures on drivers that don't explicitly advertise it as an extension

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

16 years agochange maximum lerp time from 1 second to 0.1 seconds (this was a mistake in a previo...
havoc [Mon, 21 Oct 2002 07:21:01 +0000 (07:21 +0000)]
change maximum lerp time from 1 second to 0.1 seconds (this was a mistake in a previous commit)

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

16 years agoThe new video menu is clean now (or at least cleaner). Updated Transfusion map list
molivier [Mon, 21 Oct 2002 06:07:25 +0000 (06:07 +0000)]
The new video menu is clean now (or at least cleaner). Updated Transfusion map list

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

16 years agoreorganized how heartbeat timing works (much simpler and cleaner now)
havoc [Sat, 19 Oct 2002 23:23:03 +0000 (23:23 +0000)]
reorganized how heartbeat timing works (much simpler and cleaner now)
sv_heartbeatperiod controls how often a heartbeat is sent
sv_public controls whether heartbeats are sent at all (default: 0)
sv_masterextra1 added (points at a master server that a friend just put online)

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

16 years agoImplemented a very simple video mode selection menu. The way it handles the various...
molivier [Sat, 19 Oct 2002 10:12:49 +0000 (10:12 +0000)]
Implemented a very simple video mode selection menu. The way it handles the various resolutions is still very naive, so expect another update soon.

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

16 years agoAdded a test when freeing textures (glt->image can be NULL if the program exits becau...
molivier [Sat, 19 Oct 2002 09:43:46 +0000 (09:43 +0000)]
Added a test when freeing textures (glt->image can be NULL if the program exits because of a lack of memory at startup). Also, Transfusion doesn't have a "start" map, so Transfusion dedicated servers shouldn't use it as their default map. Removed a preprocessor warning in r_shadow.c

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

16 years agotrying less optimizations in hopes that it will fix the crashs
havoc [Thu, 17 Oct 2002 02:44:08 +0000 (02:44 +0000)]
trying less optimizations in hopes that it will fix the crashs

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

16 years agoMSVC has a pathetic stack size.
havoc [Thu, 17 Oct 2002 02:39:30 +0000 (02:39 +0000)]
MSVC has a pathetic stack size.

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

16 years agooops, removed the wrong one
havoc [Wed, 16 Oct 2002 22:33:16 +0000 (22:33 +0000)]
oops, removed the wrong one

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

16 years agoremove unused variables
havoc [Wed, 16 Oct 2002 22:26:56 +0000 (22:26 +0000)]
remove unused variables

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

16 years agofixed some dynamic lighting bugs related to glowing self
havoc [Wed, 16 Oct 2002 21:48:14 +0000 (21:48 +0000)]
fixed some dynamic lighting bugs related to glowing self
rmeshstate_t now has alphascale
now clears stencil from shadows differently (draws shadow volume over again to clear)
R_LightModel now does GL_Color or GL_UseColorArray depending on whether the model has any shading
model->DrawBaseLighting function is gone, now just a few special cases in the normal Draw function
removed R_NotCulledBox
added PVS_CullBox, R_CullSphere, and PVS_CullSphere
visiblevolume flag is gone from shadow rendering code (visible volumes are now automatic depending on what stage the shadow system is in)
R_DrawShadowVolumes is gone (now just a special option to R_ShadowVolumeLighting)
cubemap textures now upload correctly
doubled the bumpyness of surfaces to make bumpmapping noticable (still less than tenebrae)
fixed crash when loading external map textures
now supports _luma as an alternate name for _glow map textures (tenebrae compatibility)
can now override _bump, _gloss, and _glow/_luma textures that were generated from the map
bumpmapping works on the map now (that was a stupid typo...)
now uses alpha buffering for multi-pass lighting effects
r_shadows 3 now works on Geforce2 (2tex no3D 3 pass per layer) and Radeon (2tex 3D 2 pass per layer - Radeon has 3 texture units but the lighting code is most efficient with 2 units, and 3D textures use up 2 texture units on Radeon... lame...)
gloss isn't working yet
r_shadows 3 mode supports up to 64x overbright lighting now (by rendering light multiple times)
fixed palettes (this fixes oddities like seeing sky behind fullbrights)

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

16 years agoAdded back "turn left" and "turn right" to the Transfusion bind list. Added 2 new...
molivier [Wed, 16 Oct 2002 08:26:48 +0000 (08:26 +0000)]
Added back "turn left" and "turn right" to the Transfusion bind list. Added 2 new Transfusion maps (e4m8 and maim)

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

16 years agomade the QueueWantsMore message a Con_DPrintf
havoc [Tue, 15 Oct 2002 23:22:36 +0000 (23:22 +0000)]
made the QueueWantsMore message a Con_DPrintf

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

16 years agocruft
havoc [Mon, 14 Oct 2002 19:37:40 +0000 (19:37 +0000)]
cruft

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

16 years agofix jitter in interpolation of monster movement
havoc [Mon, 14 Oct 2002 19:34:01 +0000 (19:34 +0000)]
fix jitter in interpolation of monster movement

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

16 years agoR_LoadTexture functions take a palette pointer now
havoc [Mon, 14 Oct 2002 19:05:23 +0000 (19:05 +0000)]
R_LoadTexture functions take a palette pointer now
there are many palettes available now (d_8to24table renamed to palette_complete)
R_LoadTexture is gone, use R_LoadTexture2D instead
bumpmaps are now generated for models and maps (sigh, so much reworking of their loaders)

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

16 years agoadded TEXF_CLAMP flag for textures
havoc [Sun, 13 Oct 2002 22:13:57 +0000 (22:13 +0000)]
added TEXF_CLAMP flag for textures
r_shadows 3 mode is under heavy construction
changed pvsframecount stuff to be part of the model structure
new function Mod_BuildTextureVectorsAndNormals added
changed/improved how animating textures work
surface texture chains are now permanent for the lifetime of the model, and are specific to each submodel
surface textures now have a rendertype field which is updated every time R_PrepareSurfaces is called, values are SURFRENDER_ADD, SURFRENDER_ALPHA, or SURFRENDER_OPAQUE
added SHADERSTAGE_BASELIGHTING
added surfaceneighbors system (currently disabled because it increases load time greatly)
surface meshs are now allocated by a single function to simplify things
more heavy construction on static shadow volumes (which aren't working correctly)
VectorNormalize, VectorNormalize2, and VectorNormalizeDouble macros no longer produce infinite vectors if given null vectors
corrected names of dot3 enums
reduced duplicate code in texture manager with some new arrays for gl texture type enums
added GL_SetupView_Mode_PerspectiveInfiniteFarClip based on code from tenebrae
texture state management now has combinergb and combinealpha for each texture unit
aliasvert array went away
aliasvert_svectors, aliasvert_tvectors, and aliasvert_normals added (note: padded to 4 floats)
aliasvertnorm replaced with aliasvert_normals (adjusted code to use 4 float padding)
new r_light_* cvars allow tweaking of r_shadows 3 lighting system
R_DrawShadowSphere now works correctly
fixed fakeshadows appearing ontop of transparent stuff
got rid of unused RSurfShader_Wall_Fullbright

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

16 years agoAdded Frag'M to the Transfusion map list
molivier [Fri, 11 Oct 2002 06:20:33 +0000 (06:20 +0000)]
Added Frag'M to the Transfusion map list

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

16 years agofixed glowing entities disappearing randomly (by testing more thoroughly)
havoc [Wed, 9 Oct 2002 17:25:05 +0000 (17:25 +0000)]
fixed glowing entities disappearing randomly (by testing more thoroughly)

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

16 years agoElric rewrote the makefile, it is quite self explanatory when run.
havoc [Mon, 7 Oct 2002 18:43:12 +0000 (18:43 +0000)]
Elric rewrote the makefile, it is quite self explanatory when run.

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

16 years agonow checks for both TexImage3D built into the OpenGL library and for GL_EXT_texture3D...
havoc [Sun, 6 Oct 2002 23:09:46 +0000 (23:09 +0000)]
now checks for both TexImage3D built into the OpenGL library and for GL_EXT_texture3D (glTexImage3DEXT, etc)

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

16 years agomake r_shadows 3 mode mostly match lighting conditions of the lightmaps
havoc [Sun, 6 Oct 2002 16:51:35 +0000 (16:51 +0000)]
make r_shadows 3 mode mostly match lighting conditions of the lightmaps
r_shadows 3 mode now checks SURF_SHADOWCAST and SURF_SHADOWLIGHT flags

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

16 years agofix restart command
havoc [Sun, 6 Oct 2002 15:08:22 +0000 (15:08 +0000)]
fix restart command

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

16 years agoclean up map changes a little more
havoc [Sun, 6 Oct 2002 15:07:48 +0000 (15:07 +0000)]
clean up map changes a little more

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

16 years agofix fragment texture image creation so it has depth 1
havoc [Sun, 6 Oct 2002 14:45:53 +0000 (14:45 +0000)]
fix fragment texture image creation so it has depth 1
error if fragment texture is attempted with texture types other than 2D

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

16 years agoGL_DrawRangeElements now reports if it got a bogus indexcount and vertex range
havoc [Sun, 6 Oct 2002 14:43:11 +0000 (14:43 +0000)]
GL_DrawRangeElements now reports if it got a bogus indexcount and vertex range

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

16 years agoR_ShadowMesh_Finish now discards empty meshs
havoc [Sun, 6 Oct 2002 14:40:58 +0000 (14:40 +0000)]
R_ShadowMesh_Finish now discards empty meshs

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

16 years agodetect 3D textures as GL_EXT_texture3D again
havoc [Sun, 6 Oct 2002 14:23:32 +0000 (14:23 +0000)]
detect 3D textures as GL_EXT_texture3D again

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

16 years agouse qbyte * math instead of void * math to keep MSVC happy
havoc [Sun, 6 Oct 2002 13:58:23 +0000 (13:58 +0000)]
use qbyte * math instead of void * math to keep MSVC happy

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

16 years ago3D attenuation texture works now
havoc [Sun, 6 Oct 2002 03:24:47 +0000 (03:24 +0000)]
3D attenuation texture works now
also fixed the commandline options -width and such (untested)

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

16 years agobackend now supports 1D, 2D, 3D, and Cubemap texture binding
havoc [Sat, 5 Oct 2002 19:32:43 +0000 (19:32 +0000)]
backend now supports 1D, 2D, 3D, and Cubemap texture binding

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

16 years agotexcoord arrays are now 3 component (padded to 4 floats)
havoc [Sat, 5 Oct 2002 14:38:14 +0000 (14:38 +0000)]
texcoord arrays are now 3 component (padded to 4 floats)
rewrote zym model loader
partially rewrote skysphere rendering

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

16 years agonow uploads a 3D attenuation texture (not used yet)
havoc [Fri, 4 Oct 2002 22:31:51 +0000 (22:31 +0000)]
now uploads a 3D attenuation texture (not used yet)

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

16 years agoforgot to add prototypes for new texture functions to r_textures.h
havoc [Fri, 4 Oct 2002 22:28:42 +0000 (22:28 +0000)]
forgot to add prototypes for new texture functions to r_textures.h
fixed misreporting of texture memory use (was reporting 0 for all textures because sides was 0)

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

16 years ago1D, 3D, and cubemap textures are now supported (in addition to 2D)
havoc [Fri, 4 Oct 2002 21:04:11 +0000 (21:04 +0000)]
1D, 3D, and cubemap textures are now supported (in addition to 2D)
added detection of GL_EXT_texture3D, GL_ARB_texture_cube_map, and GL_ARB_texture_env_dot3
shadow volume rendering mode now depends on all of the above being present (but doesn't use them yet)

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

16 years agoshadow volume rendering still very incomplete, but works mostly
havoc [Fri, 4 Oct 2002 13:52:01 +0000 (13:52 +0000)]
shadow volume rendering still very incomplete, but works mostly
committing this before I add 3D textures to the texture manager
(alert: this is the last version of the stencil shadow rendering that will work with TNT class hardware (and not well), 3D textures will be required and will not work on TNT class... sorry.  vertex just looks too horrible)

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

16 years agoAdded a couple more "const". Fixed "+map" in the command line for dedicated servers...
molivier [Fri, 4 Oct 2002 06:05:46 +0000 (06:05 +0000)]
Added a couple more "const". Fixed "+map" in the command line for dedicated servers. Updated LordHavoc email address in the multiplayer menu. Removed some duplicated code.

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

16 years agomassive coding has been done on shadow volumes (some scrapped code which will be...
havoc [Thu, 3 Oct 2002 17:11:24 +0000 (17:11 +0000)]
massive coding has been done on shadow volumes (some scrapped code which will be removed, some incomplete code, etc)
some model fixes relating to gl_combine - r_quickmodels is gone
off-screen models were not being culled (oops)

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

16 years agoFrom LordHavoc: the r_quickmodels cvar wasn't used anywhere; it's fixed.
molivier [Thu, 3 Oct 2002 06:51:52 +0000 (06:51 +0000)]
From LordHavoc: the r_quickmodels cvar wasn't used anywhere; it's fixed.

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

16 years agoRemoved an unused variable in gl_draw.c (Forest, could you double check this one...
molivier [Thu, 3 Oct 2002 06:36:54 +0000 (06:36 +0000)]
Removed an unused variable in gl_draw.c (Forest, could you double check this one please?). Removed an useless include in vid_null.c

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

16 years agoFixed dedicated server (the server was never really spawned)
molivier [Wed, 2 Oct 2002 12:02:15 +0000 (12:02 +0000)]
Fixed dedicated server (the server was never really spawned)

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

16 years agoMade a few changes to makefile so we can switch compiler more easily
molivier [Wed, 2 Oct 2002 07:02:14 +0000 (07:02 +0000)]
Made a few changes to makefile so we can switch compiler more easily

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

16 years agoTried to be a little smarter with the heartbeats, using a simple priority mecanism...
molivier [Wed, 2 Oct 2002 06:50:45 +0000 (06:50 +0000)]
Tried to be a little smarter with the heartbeats, using a simple priority mecanism. Added a few "const" here and there in the net code. Fixed heartbeat code on Win32 (added Loop_Heartbeat and Datagram_Heartbeat to net_win.c; oups...)

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

16 years agooptimized trianglefacing calculation, per Vic's recommendation (yes it's all one...
havoc [Mon, 30 Sep 2002 18:01:08 +0000 (18:01 +0000)]
optimized trianglefacing calculation, per Vic's recommendation (yes it's all one statement now)
shadow functions now take a vertex array pointer, to make them more broadly useful (in precomputation perhaps?)
beginning work on a precomputed shadow volumes system for static lights

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

16 years agobmodel shadow volumes
havoc [Mon, 30 Sep 2002 14:55:28 +0000 (14:55 +0000)]
bmodel shadow volumes
static lights (in maps with .lights files) now cast shadow volumes (this combined with the above makes dpdm1 and dpdm2 unplayably slow - need to do precomputed world shadow volumes)
(note: like the previous shadow volume commits, this is still just visible volumes when you use r_shadows 2, purely experimental still)

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

16 years agosmoke from bullet impacts and rocket trails now grows in size a little as it fades
havoc [Mon, 30 Sep 2002 14:52:26 +0000 (14:52 +0000)]
smoke from bullet impacts and rocket trails now grows in size a little as it fades

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

16 years agogl backend now has functions for color array and flat color states (GL_UseColorArray...
havoc [Mon, 30 Sep 2002 06:53:30 +0000 (06:53 +0000)]
gl backend now has functions for color array and flat color states (GL_UseColorArray and GL_Color), this gets a 9.76% speed gain in bigass1 for me

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

16 years agofix changelevel, and simplify restart code
havoc [Mon, 30 Sep 2002 03:37:53 +0000 (03:37 +0000)]
fix changelevel, and simplify restart code

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

16 years agofix view blends
havoc [Mon, 30 Sep 2002 02:34:37 +0000 (02:34 +0000)]
fix view blends

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

16 years agonewline to keep gcc3 happy
havoc [Mon, 30 Sep 2002 02:19:36 +0000 (02:19 +0000)]
newline to keep gcc3 happy

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

16 years agoforgot to commit this
havoc [Mon, 30 Sep 2002 02:07:32 +0000 (02:07 +0000)]
forgot to commit this

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