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
havoc [Fri, 15 Dec 2006 19:42:10 +0000 (19:42 +0000)]
modified "stuffcmds" command (which runs commandline arguments preceded by + characters) to only do so once, this allows the quake.rc to be executed multiple times without executing commandline arguments multiple times
havoc [Fri, 15 Dec 2006 17:38:52 +0000 (17:38 +0000)]
removed NET_MAXRATE (as it served no useful purpose), changed description of rate to say bytespersecond instead of 500-25000 (which was wrong, the limit was 1000-150000)
havoc [Tue, 12 Dec 2006 06:28:54 +0000 (06:28 +0000)]
display loading plaque much sooner in startup process, and draw it to GL_FRONT buffer rather than drawing it to the GL_BACK buffer and swapping, as if triple buffering is used the GL_BACK buffer might not be shown for some time, but the GL_FRONT buffer is instantaneous
havoc [Mon, 11 Dec 2006 16:39:13 +0000 (16:39 +0000)]
moved health counter in quake hud back to its original position, no longer overlapping hipnotic key icons (for some reason Black's patch to add the nexuiz hud in revision 1.27 also moved the quake health counter, I can't discern why...)
havoc [Mon, 11 Dec 2006 10:07:47 +0000 (10:07 +0000)]
optimized Mod_Alias_GetMesh_Vertices to eliminate memset calls and process arrays independently of eachother in the skeletal blending code, it also has an optimized case for one-bone vertices (the most common case)
havoc [Wed, 6 Dec 2006 13:12:57 +0000 (13:12 +0000)]
fixed bug where non-autosprite transparencies rendered in the same batch as autosprite transparencies were not rendered (fixes light cones disappearing in q3dm0, among other things), this occurred because the code that handles q3 shaders using "deformvertexes autosprite" changed the array pointers but never changed them back when rendering another q3 shader that does not use deformvertexes
minor cleanup of RSurf_ActiveEntity (now uses RSurf_CleanUp rather than duplicating code)
moved RSurf_CleanUp above RSurf_ActiveEntity
havoc [Wed, 6 Dec 2006 11:05:41 +0000 (11:05 +0000)]
improved warnings from drawstring/drawpic/drawfill functions (they now state the correct function name, and print the full warning message, previously they were truncated if it was only one problem)
havoc [Tue, 5 Dec 2006 09:00:09 +0000 (09:00 +0000)]
fixed a bug with blank frames in sprites failing to produce a texture (fixes painkeep exploding shotgun shell sprites which became white rectangles on certain frames)
havoc [Sat, 25 Nov 2006 01:28:12 +0000 (01:28 +0000)]
patch from Dresk which adds DP_SV_ENTITYCONTENTSTRANSITION extension which calls a .contentstransition(oldcontents, newcontents) when the quake physics code detects a contents transition (empty to water for example)
havoc [Fri, 24 Nov 2006 22:55:08 +0000 (22:55 +0000)]
patch from Dresk for DP_QC_STRINGCOLORFUNCTIONS extension (strlennocol measures length of string with color chars removed (useful for centering text), strdecolorize returns a string with color codes stripped)
havoc [Fri, 17 Nov 2006 15:47:22 +0000 (15:47 +0000)]
added #define _FILE_OFFSET_BITS 64 to reduce problems with video recording on 32bit unix platforms (64bit Linux builds do not seem to have problems with this to begin with)
havoc [Wed, 15 Nov 2006 11:23:55 +0000 (11:23 +0000)]
made cl_viewmodel_scale apply to csqc and gettaginfo
fixed bug with concat order in stereo rendering (it was offseting along X in worldspace due to wrong concat order)
havoc [Wed, 15 Nov 2006 09:33:22 +0000 (09:33 +0000)]
fixed view location bugs in csqc; it was reading the player entity's render.origin field, which was broken... removed the origin and angles fields from entity_render_t and eliminated all references
renamed CL_BoundingBoxForEntity to CL_UpdateRenderEntity and made it update the entity_render_t inversematrix and scale according to the matrix, and also calls R_LerpAnimation, this reduced code elsewhere
havoc [Thu, 9 Nov 2006 10:16:16 +0000 (10:16 +0000)]
patch from div0 that removes connect flood ban when a player disconnects (this prevents people from getting connect-flood-banned for simply reconnecting after a pk3 autodownload in Nexuiz)
havoc [Mon, 6 Nov 2006 08:25:26 +0000 (08:25 +0000)]
implemented MATRIX4X4_OPENGLORIENTATION #define option, this is on by default and may improve performance compared to the D3D-style matrix orientation that was used before
havoc [Mon, 6 Nov 2006 06:13:54 +0000 (06:13 +0000)]
cleaned up almost all direct indexing of matrix4x4_t structures to go through proper Matrix4x4 functions
removed some weird scaling code in gettaginfo QC builtin
havoc [Mon, 23 Oct 2006 10:34:09 +0000 (10:34 +0000)]
implemented connect flood blocking (100% effective on connect floods with an interval of 5 seconds or less between connects from the same IP address, and limits connect floods slower than that to occupying 2 slots at once due to a 10 second timeout)
cleaned up connect packet handling code to be more readable and consistent
reenabled rejoin code (allowing players to resume the game if their client crashes crashes but comes back with the same port number - rather rare unless cl_port is used, but could help people who do use cl_port)
havoc [Tue, 3 Oct 2006 20:22:58 +0000 (20:22 +0000)]
added snd_soundradius cvar (default 1000 as before) to allow games (Nexuiz for instance) and people (mostly fans of dos quake's different sound radius) to adjust the sound radius
implemented condump command (I was told by [515] that he implemented this command but he never sent me the code in his patch and so I was incorrectly under the impression that it was in the engine)
fixed a (hopefully rare) bug affecting shalrath missiles which caused multiple missiles to explode on successive frames due to the large bounding boxes of the MOVETYPE_FLYMISSILE explosions causing a touch event on the other flying missiles that were not yet near the player, which caused them to explode even though they were being touched by an explosion that was SOLID_NOT
fix bug that often made enforcer laser bolts 'stick' in the air if a player is standing right next to the enforcer when it fires, this was due to some internal confusion over what constitutes a 'startsolid' case, this has been clarified so that SV_PushEntity only uses trace.bmodelstartsolid, just like the toss/bounce/fly/flymissile/bouncemissile physics expect
removed video capture formats other than AVI I420 as it is the only useful format in practice (lots of jpeg/tga files is annoying to deal with, and few programs support rgb/yv12 raw dumps), this means no more .wav saving either and cleans the code a bit
fixed several bugs in sound system when saving avi (lingering .wav code)
added cl_capturevideo_realtime cvar to allow realtime capture if desired (requires a fast machine and can have A/V sync issues)
implemented direct AVI video capture using the I420 colorspace (aka Intel(r) 4:2:0 codec) with interleaved PCM audio, and would like to thank Microsoft(r) for wasting many hours of my time with AVI format insanity
changed VM_fopen and VM_fclose announcements to require developer >= 100 like the VM_fputs/VM_fgets functions do, and made them console prints instead of VM_Warning calls (not sure why they were to begin with)
black [Wed, 13 Sep 2006 21:07:04 +0000 (21:07 +0000)]
Try to fix a dedicated server crash by moving the two csqc_ cvar initializations
into SV_Init. This is a hack, however, so someone else please clean this up :)
The VM's internal name now is always "client", so this should make life easier
when debugging (note: this doesn't affect the progs filename used).
changed deluxemapping detection code to deal with odd bsp files produced by q3map2 that contain two lightmaps but the second one is completely unused and blank and thus not suitable as a deluxemap, this fixes black (or very dim) surfaces in some small maps when GLSL is enabled
remove some unsafe optimizations in VM_Files_Init and VM_Files_CloseAll (using memset on the return value of an indexing macro is generally a bad idea, and doesn't improve code readability)
havoc [Tue, 29 Aug 2006 12:58:45 +0000 (12:58 +0000)]
another patch from div0 to improve ping parsing behavior in the event that multiple ping reports are received after a query (due to packets backlogging)
havoc [Sun, 27 Aug 2006 10:13:24 +0000 (10:13 +0000)]
patch from div0 to fix ping report parsing where the first player slots are empty
fixed bug in negative ping parser (it was not skipping the - when it was negative)