havoc [Mon, 29 Jan 2007 09:52:31 +0000 (09:52 +0000)]
fix very stupid bug in svbsp calls that made only the first triangle of an occluding surface polygon be inserted into the svbsp, and some other cleanup/corrections
havoc [Sun, 28 Jan 2007 02:57:51 +0000 (02:57 +0000)]
implemented Shadow Volume BSP based culling of lit surfaces, this is slightly better than the existing portal culling code (or much better in the case of detail brush terrain in q3bsp where little culling was performed previously), and is now the only culling method used by rtlight compilation
havoc [Sun, 28 Jan 2007 02:52:41 +0000 (02:52 +0000)]
patch from Tomaz adding a proper matrix inverter, it should be able to invert any matrix that is possible to invert, but is VERY slow, and consequently Matrix4x4_Invert_Simple has been kept for speed reasons
it is probably possible to optimize this function significantly, and it would also be possible to add non-uniform-scaling inversion to Matrix4x4_Invert_Simple to make it more flexible
havoc [Sun, 28 Jan 2007 02:50:32 +0000 (02:50 +0000)]
added Debug_Polygon functions for testing, these are currently abusing the CSQC polygon queue and have many stupid limitations which should be cleaned up at some point, but it is now possible to call these to draw things for debugging purposes
havoc [Fri, 26 Jan 2007 05:58:43 +0000 (05:58 +0000)]
changed sbar stats (Monsters/Secrets/Time/map title) around a bit, inspired by a patch from steven a but not directly based on it
specific changes: Monsters/Secrets are now on top row (rather than left side), map filename (minus path/extension) and map title are shown, time moved to far right of second row
havoc [Wed, 24 Jan 2007 21:27:06 +0000 (21:27 +0000)]
disabled use of Portal_PortalThroughPortalPlanes on triangles in exact triangle culling mode because it was falsely culling some polygons (particularly in start.bsp), this makes the culling less exact unfortunately
havoc [Wed, 24 Jan 2007 17:48:49 +0000 (17:48 +0000)]
some cleanup of shader permutation handling
expanded shader permutation system to allow multiple shader source files (not sure if this will ever be used) rather than just "glsl/default.glsl"
added code support for geometry shaders (not actually hooked up because there's no GL_ARB_geometry_shader extension yet)
added flagging of which shader objects are needed by a given permutation (to allow vertex-only shaders for shadow volume projection and such, also not implemented)
havoc [Wed, 24 Jan 2007 04:15:45 +0000 (04:15 +0000)]
redesigned tempstring system, now uses a fixed size buffer based on the prvm_tempstringmemory cvar (this is probably safe to automatically resize in the future but is not currently resized)
audited PRVM_G_STRING use in the engine (eliminated many NULL checks in functions because it never returns NULL)
added DP_QC_UNLIMITEDTEMPSTRINGS extension to indicate this new tempstring system's wonderous features (not yet documented)
havoc [Wed, 24 Jan 2007 03:56:16 +0000 (03:56 +0000)]
added r_hdr_range cvar (which just divides r_bloom_colorscale and multiplies r_bloom_brighten)
changed default r_bloom_brighten from 2 to 1 and r_bloom_colorsubtract from 0.125 to 0, this gives a more color-preserving bloom effect and actually seems brighter in many cases
havoc [Tue, 23 Jan 2007 16:58:57 +0000 (16:58 +0000)]
changed Cmd_StuffCmds_f to combine the entire set of commandline arguments into one string before calling Cbuf_InsertText, this fixes the reverse order execution bug (where +deathmatch 7 +map dpdm2 would execute deathmatch 7 AFTER starting the map, which was useless until a restart command was issued)
havoc [Tue, 23 Jan 2007 01:40:36 +0000 (01:40 +0000)]
fixed bug in CSQC_AddRenderEdict (it was using the tempentity's modelindex rather than the vm entity, meaning that csqc entities never had a visible model)
reduced code by merging cl.csqc_model_precache lookups into CSQC_GetModelByIndex and CSQC_GetModelFromEntity functions
havoc [Tue, 23 Jan 2007 00:27:49 +0000 (00:27 +0000)]
significant cleanup of CL_UpdateEntities, GL_UpdateNetworkEntity, CL_LinkNetworkEntity, V_CalcRefdef handling, and CSQC issues related to these
eliminated linkframe from entity_t (this means CL_UpdateNetworkEntity may sometimes process an entity twice, and CL_LinkNetworkEntity is no longer recursive as it does not need to be)
havoc [Mon, 22 Jan 2007 22:01:27 +0000 (22:01 +0000)]
implemented csprogs.dat downloading with special dlcache/name.size.crc file naming, this is in need of testing
added csqc_progsize cvar to csqc signon process (still compatible with old servers)
havoc [Mon, 22 Jan 2007 19:31:49 +0000 (19:31 +0000)]
two improvements to vid_restart in the SDL client: hardware gamma is now
restored after vid_restart, and the brief fullscreen window (used to reset
the SDL GL attributes) is now only used during vid_restart, not the initial
client startup
havoc [Mon, 22 Jan 2007 18:20:05 +0000 (18:20 +0000)]
modified droptofloor to treat trace.startsolid as an acceptable situation, this prevents many items falling out of various user-made maps (including a critial item in level x2m4 of X-Men: Ravages of Apocalypse)
added sv_gameplayfix_droptofloorstartsolid cvar to control this behavior
havoc [Mon, 22 Jan 2007 14:42:05 +0000 (14:42 +0000)]
moved EF_MUZZLEFLASH checking to CL_MoveLerpEntityStates to make muzzleflashes reliably work when the client is running slower than the server
made muzzleflash 1.5x as large and 4x as bright as before, and fade in 50ms instead of 100ms
changed dlight decay to scale color instead of radius
havoc [Mon, 22 Jan 2007 13:37:39 +0000 (13:37 +0000)]
tweaked default TE_TELEPORT effect, it now spawns one large very bright particle in the middle and 1/8th as many small particles, this should improve multiplayer performance on slow graphics cards, also doubled the brightness of the dlight created, and made it last a bit longer
havoc [Mon, 22 Jan 2007 13:22:46 +0000 (13:22 +0000)]
improved SV_TestEntityPosition in q1bsp/hlbsp by checking the 8 corner points of the box, this fixes the misaligned double-doors bug in the Prydon Gate expansion "The Dark Age"
changed Stuck entity warning from developer 1 to developer 100 because it's annoying and not very helpful
havoc [Mon, 22 Jan 2007 12:06:42 +0000 (12:06 +0000)]
changed FS_ChangeGamedir to FS_ChangeGameDirs and made it fail if any of the gamedirs are missing (if the failmissing parameter is set) and detect various other failures
FS_Init now checks if game directories are found and does a Sys_Error if not
now does a Host_Error if a QW server specifies an invalid gamedir (missing gamedir is ok however, because QW downloads files)
havoc [Mon, 22 Jan 2007 10:40:58 +0000 (10:40 +0000)]
changed ping report name matching to allow scoreboard names to be longer than ping report names (because recent versions of ClanRing CTF seem to append READY on the scoreboard but not the ping report)
havoc [Sun, 21 Jan 2007 20:27:36 +0000 (20:27 +0000)]
implemented individual file downloads on darkplaces servers
deferred loading of files until signon 2 (necessary for download system)
made loading of files operate in two passes, first for existing files and then again for files that need to be downloaded
added cl_joinbeforedownloadsfinish cvar to cause the game to begin after the map is loaded, before other downloads finish (not entirely sure this is a good idea, but it's cool)
added sv_allowdownloads cvar to allow enabling/disabling of downloads, and sv_allowdownloads_inarchive and sv_allowdownloads_archive cvars to allow server administrators to enable downloading files from archives or even whole archives if so desired (however the client does not currently request archives)
havoc [Sun, 21 Jan 2007 14:21:53 +0000 (14:21 +0000)]
reorganized view rendering setup code a bit to reduce potential for state bugs (more thorough and consistent state resets now)
added support for glStencilOpSeparate function in OpenGL 2.0 (or GL_ATI_separate_stencil extension prior to that), so ATI cards should get a speed boost now, this path is now also used on NVIDIA hardware, but support for GL_EXT_stencil_two_side extension has been retained to support several other vendors
havoc [Sun, 21 Jan 2007 11:39:19 +0000 (11:39 +0000)]
r_textshadow is now a saved cvar
the r_textshadow shadow color is now 1-red-green-blue (basically meaning it is black except for black text where it is white)
havoc [Sat, 20 Jan 2007 09:14:02 +0000 (09:14 +0000)]
S_PrecacheSound now clears the SFXFLAG_FILEMISSING flag so that loading will try again on previously missing files whenever the level changes (particularly important if downloads or gamedir changes have occurred)
havoc [Thu, 18 Jan 2007 10:58:03 +0000 (10:58 +0000)]
applied div0's patch to the tell command adding player number support (as opposed to the hard-to-type player names) as well as fixing a bug with quoted player names containing spaces accidentally sending part of the player name to the recipient (similar to the quake tell bug which sent the entire player name)
havoc [Thu, 18 Jan 2007 10:44:24 +0000 (10:44 +0000)]
added collision_prefernudgedfraction cvar (defaults to 1), which should improve collision stability in 'wedge corner' cases (such as creases in terrain)
havoc [Thu, 18 Jan 2007 08:49:50 +0000 (08:49 +0000)]
support partial IP addresses in the ipv4 address parser, this fixes the 20+ second delay when parsing status messages on some modified quake servers that report only partial addresses (hiding the last octet)
havoc [Sun, 14 Jan 2007 10:05:49 +0000 (10:05 +0000)]
patch from div0 to add sv_adminnick cvar which overrides hostname as the name to use in chat from the dedicated server console (or via rcon say and such)
havoc [Sun, 14 Jan 2007 09:56:30 +0000 (09:56 +0000)]
patch from div0 that adds a special "extResponse " type of packet that can be returned to menu qc as a string (to query current version of Nexuiz or anything else of that nature, requires special servers that return such packets, the packets are sent using the "packet" command which already existed from qw support)
havoc [Fri, 12 Jan 2007 03:40:35 +0000 (03:40 +0000)]
changed Cmd_AddCommand to only work for console commands, not client commands executed on the server, Cmd_AddCommand_WithClientCommand has been added to allow separate command functions for console commands and client commands, this got rid of a lot of cmd_source == src_command checks
this refactoring fixes a security vulnerability in the clcommand builtin provided by KRIMZON_SV_PARSECLIENTCOMMAND, which was able to execute many commands on the server console, and that put the burden on the QC code to validate command safety, which was not intended
in short: this fixes a remote console command execution vulnerability that affected a few games/mods
havoc [Fri, 12 Jan 2007 00:34:19 +0000 (00:34 +0000)]
gamedir is now checked by FS_CheckNastyPath
added special isgamedir flag to FS_CheckNastyPath to validate gamedir using more stringent checks than for normal filenames
added additional checks in FS_CheckNastyPath for things like . in path elements (still allowed in filename at end but no longer allowed in path elements at all)
havoc [Thu, 11 Jan 2007 04:48:25 +0000 (04:48 +0000)]
implemented new bloom code (still not using GLSL, but the new bloom is much nicer and more configurable)
added r_shadow_glossexponent cvar to control width of specular highlights
changed r_shadow_glossexponent default from 8 to 32 (looks more like metal or wet stone)
havoc [Sun, 31 Dec 2006 19:38:46 +0000 (19:38 +0000)]
added r_shadow_glossexponent cvar to control specular power (sharpness)
changed default r_shadow_glossintensity from 1 to 2, r_shadow_gloss2intensity from 0.25 to 0.5, r_shadow_glossexponent from 8 to 32 (gloss is now much more metallic looking)
moved some stencil operation reset code to after the GL_EXT_stencil_two_side extension is turned off (just to be safer)
havoc [Sun, 24 Dec 2006 09:38:01 +0000 (09:38 +0000)]
changed collision brush loader to not discard planes that don't produce a polygon, this fixes many terrain and ramp problems in q3bsp (q3map2 inserted planes to fix these edge cases but the engine was discarding them)
optimized brush collision code to have more early out cases
black [Sat, 23 Dec 2006 16:04:52 +0000 (16:04 +0000)]
Init gl_main before gl_draw to make DP start from anywhere without crashing. Additionally it's more logical that way.
(If this breaks something, you can try to stone me or whoever who wrote the code in the first place ;))
havoc [Fri, 22 Dec 2006 13:05:38 +0000 (13:05 +0000)]
raised MAX_TEXTUREUNITS from 16 to 64
fixed bug with backendimageunits/backendarrayunits not being limited to MAX_TEXTUREUNITS (caused memory corruption on NVIDIA GeForce 8 series which have 32 texture image units), backendunits was already limited properly
havoc [Thu, 21 Dec 2006 09:12:21 +0000 (09:12 +0000)]
removed Q3TEXTUREFLAG_ALPHATEST uses in the code, fixing a bug that made alpha test surfaces not be alpha tested (now checks shader->layers[0].alphatest)
havoc [Tue, 19 Dec 2006 06:47:27 +0000 (06:47 +0000)]
support for GL_ARB_texture_non_power_of_two extension (makes quake textures look a bit sharper on cards that support it and saves video memory)
known to be supported on NVIDIA Geforce 6 and above
havoc [Sun, 17 Dec 2006 18:25:46 +0000 (18:25 +0000)]
implemented QW gamedir switching and manual gamedir switching (via "gamedir" command in console, can also use +gamedir on commandline), this may have lingering bugs
havoc [Sun, 17 Dec 2006 18:20:24 +0000 (18:20 +0000)]
improved Mod_Q3BSP_LightPoint function to use r_refdef.lightstylevalue[0] to scale the color contribution, this means that dpmod darkmode works in q3bsp now