rcon server: add an explicit check against empty password, instead of assuming the calling code is correct.
This logic had a bug in the past that had been introduced by r8886 and
accidentally fixed when introducing multi-account support in r9420. The bug was
that rcon_password being empty led to the empty password being accepted in some
cases, as there was never any explicit logic to handle that in rcon - it was
more "accidentally" rejected by a packet formatting check which does not apply
to srcon as the empty password wouldn't be empty over the wire.
In other words: DP builds from [r8886, r9419] had a serious vulnerability and
the only workaround is to always have rcon_password set.
The check added here will complain and reject in case the calling code for some
reason no longer prevents empty passwords from being accepted.
Also adding comments to the new logic explaining how it prevents the empty
password from being accepted.
Fix a bug in collisions between brushes and brushes when the plane is rotating - this case is never used currently but it's definitely a bug worth fixing.
Fix bugs in ModList_RebuildList such that it no longer lists files in the quake directory as gamedirs.
These bugs were previously hidden by a different behavior in FS_CheckNastyPath until 20140716 where directories with a period in their name were skipped, but that was not a complete solution.
havoc [Sat, 14 Jan 2017 19:33:33 +0000 (19:33 +0000)]
added separate cl_nopred cvar to use when playing on qw servers since
players expect prediction in quakeworld, now cl_movement is only used on
dp6/dp7 servers.
havoc [Sat, 14 Jan 2017 19:33:33 +0000 (19:33 +0000)]
added separate cl_nopred cvar to use when playing on qw servers since
players expect prediction in quakeworld, now cl_movement is only used on
dp6/dp7 servers.
divverent [Wed, 11 Jan 2017 21:50:45 +0000 (21:50 +0000)]
Travis changes for Xonotic:
- Do not require root any more.
- Change the i386 build to build on Ubuntu directly, not in a chroot created using debootstrap.
- Remove the -isysroot option for OS X as the path broke after some Travis change.
divverent [Wed, 11 Jan 2017 21:50:45 +0000 (21:50 +0000)]
Travis changes for Xonotic:
- Do not require root any more.
- Change the i386 build to build on Ubuntu directly, not in a chroot created using debootstrap.
- Remove the -isysroot option for OS X as the path broke after some Travis change.
havoc [Tue, 3 Jan 2017 03:25:39 +0000 (03:25 +0000)]
Fix some crashes affecting dedicated quake servers where texture->materialshaderpass is NULL. A few other tweaks to ca_dedicated checks that were redundant.
havoc [Mon, 2 Jan 2017 01:12:46 +0000 (01:12 +0000)]
Fix rogue mission pack (Dissolution of Eternity) plasma launcher which
uses velocity so small initially that SV_CheckVelocity was zeroing it in
the denormal check - the threshold has been lowered by 3 digits since
this was really only meant to detect denormals, not mess with real
numbers
havoc [Mon, 2 Jan 2017 00:26:06 +0000 (00:26 +0000)]
change shadowmapping atlas from 4096x4096 to 8192x8192 because it looks
bad when it has to degrade shadowmap resolution to fit into 4096x4096
some of the time in start.bsp
this texture size is 256MB and should fit on most video cards...
havoc [Sat, 10 Dec 2016 19:50:51 +0000 (19:50 +0000)]
Fix bug in loading additional skins after the ones that exist in the model in mdl loader, which resulted in the missing texture being shown because the skin referenced a texture beyond num_textures.
vic [Fri, 2 Dec 2016 20:19:47 +0000 (20:19 +0000)]
Use tighter bounds for bouncegrid texture
Calculate bounds enclosing all lights instead of using the world bounds.
Maps with unlit monster containers such as e1m7 benefit from reduced RAM usage.
havoc [Sun, 27 Nov 2016 21:29:12 +0000 (21:29 +0000)]
Add skipsupercontentsmask parameter to all the collision implementations, this allows you to ignore brushes/surfaces matching the specified contents flags, the primary use is ignoring q1bsp sky surfaces which are SUPERCONTENTS_SKY and SUPERCONTENTS_SOLID, since SUPERCONTENTS_SOLID is in the hitsupercontentsmask it will normally block on sky surfaces, but this way it will not if they also have SUPERCONTENTS_SKY set.
Use the new skipsupercontentsmask feature for bouncegrid traces and certain other light traces.
havoc [Tue, 11 Oct 2016 01:05:53 +0000 (01:05 +0000)]
Added cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth way (rather than limiting the velocity and cl_bob independently, it limits the strength of the bob before the sinewave is applied). By default this is 7 (inspired by the quake limit of +4 to -7 range).
Added cl_bob_limit_heightcheck cvar (off by default) which uses tracelines to limit the maximum value of cl_bob_limit based on the ceiling and floor height.
Added cl_bob_velocity_limit cvar which replaces the hard-coded 400 in a few places for xyspeed purposes.
Fix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST for any maps that might use it, force fullbright rendering on SURF_TRANS33/SURF_TRANS66/SURF_WARP textures which fixes the rain in 3v3gloom3.bsp and chainlink fence textures on tkse.bsp and glass transparency on gloom1se.bsp among others. Also fix the SURF_FLOWING scroll rate when combined with SURF_WARP.
Also fixed the collision issues caused by stomping over Q1BSP data which caused traceline to break on Q1BSP after loading a Q2BSP map, thanks Supa for that bug report and finding other Q2BSP issues.
havoc [Sun, 28 Aug 2016 05:29:09 +0000 (05:29 +0000)]
Added r_shadow_bouncegrid_lightpathsize which is an alternative to blur
- but in practice this is just slower at a value of 3 than 1 is with
blur, so blur remains the default approach.
Implemented r_shadow_bouncegrid_floatcolors cvar which uses fp16 and
fp32 float formats to increase dynamic range.
Overhauled the default values of the bouncegrid cvars to look better.
havoc [Sat, 27 Aug 2016 22:28:59 +0000 (22:28 +0000)]
implemented r_shadow_bouncegrid_blur, this tremendously improves
quality at a cost of processing time, eliminating many rounding error
problems in all levels.
renamed several r_shadow_bouncegrid_* cvars to have a dynamic prefix,
and split spacing so that it can also be different between
static/dynamic modes (static now uses 32).
havoc [Sat, 27 Aug 2016 19:34:06 +0000 (19:34 +0000)]
Refactored r_shadow_bouncegrid light splatting code, it now makes an
array of light paths and then performs their splatting in a separate
step with an optional sort.
Implemented culling of out-of-view light paths in dynamic mode.
havoc [Sat, 27 Aug 2016 18:00:00 +0000 (18:00 +0000)]
Refactored r_shadow_bouncegrid code into several functions, changed
photon distribution math to make the photons more stable from frame to
frame (in dynamic mode), the number of photons fired is now based on
r_shadow_bouncegrid_intensityperphoton rather than always going for
maximum photons (accordingly r_shadow_bouncegrid_photons has been
renamed maxphotons and will still apply the old logic if it must).
havoc [Sat, 27 Aug 2016 03:17:49 +0000 (03:17 +0000)]
Fix a serious bug with r_shadow_bouncegrid_static where it used
R_CullBox and other view-dependent performance optimizations when
compiling the static texture - thanks to Vic for finding this bug!
The input destination is toggled on the first event, and the console then would
receive the charcode events. Binds work differently though - their action is
queued into the console buffer, and executed at the end of the frame!
The input destination is toggled on the first event, and the console then would
receive the charcode events. Binds work differently though - their action is
queued into the console buffer, and executed at the end of the frame!
havoc [Tue, 29 Nov 2016 03:24:12 +0000 (03:24 +0000)]
Rewrote bouncegrid path splatting, it now has a cone shape which grows with distance, which reduces the splotchy look (cvars r_shadow_bouncegrid_lightpathsize_initial and r_shadow_bouncegrid_lightpathsize_conespread control this).
Replaced r_shadow_bouncegrid_(static|dynamic)_energyperphoton with r_shadow_bouncegrid_(static|dynamic)_quality cvar which works opposite the old one and is automatically multiplied by spacing^2 so you no longer have to hand-tune it when changing spacing.
Turned off r_shadow_bouncegrid_blur by default - it's still useful but no longer completely necessary.
Replaced r_shadow_bouncegrid_dynamic_stablerandom with r_shadow_bouncegrid_rng_type (which defaults to Lehmer 128bit RNG) and added r_shadow_bouncegrid_rng_seed (which can be set to -1 for the time-based random that stablerandom <= 0 used to trigger).
havoc [Mon, 28 Nov 2016 03:56:16 +0000 (03:56 +0000)]
Fix severe bugs in mul128 implementation which was breaking the Lehmer RNG.
Added gcc specific implementation of mul128 using __int128 intrinsic type.
Added unit tests for mul128 implementation.
Added r_shadow_bouncegrid_normalizevectors cvar, default on, this slightly brightens typical scenes, some more affected than others.
Changed the behavior of r_shadow_bouncegrid_dynamic_stablerandom to also affect static mode, changed it to use the light position as the RNG seed, and changed the meaning of stablerandom 1 to be lhcheeserandom again as it is fast and of sufficient quality, the Lehmer RNG is available as stablerandom 2 but it has a framerate hit in dynamic mode that I can't ignore.
havoc [Sun, 27 Nov 2016 21:52:57 +0000 (21:52 +0000)]
Changed bouncegrid to use its own buffers (Mem_Alloc) instead of R_FrameData_Alloc because bouncegrid can be > 500MB per allocation which is unreasonable pressure on R_FrameData_Alloc.
Reduce memory when using r_shadow_bouncegrid_blur by ping-ponging between two buffers rather than three.
Reduce memory when using small values of r_shadow_bouncegrid_(static|dynamic)_spacing by disabling blur and instead effectively increasing r_shadow_bouncegrid_lightpathsize by 2 (the result is identical, just slower).
havoc [Sun, 27 Nov 2016 21:36:38 +0000 (21:36 +0000)]
Don't allocate resize buffer for texture upload if the texture does not need to be resized (this helps with memory pressure on the bouncegrid texture which was causing a huge memory alloc every frame in dynamic mode).
havoc [Sun, 27 Nov 2016 21:29:12 +0000 (21:29 +0000)]
Add skipsupercontentsmask parameter to all the collision implementations, this allows you to ignore brushes/surfaces matching the specified contents flags, the primary use is ignoring q1bsp sky surfaces which are SUPERCONTENTS_SKY and SUPERCONTENTS_SOLID, since SUPERCONTENTS_SOLID is in the hitsupercontentsmask it will normally block on sky surfaces, but this way it will not if they also have SUPERCONTENTS_SKY set.
Use the new skipsupercontentsmask feature for bouncegrid traces and certain other light traces.
havoc [Tue, 11 Oct 2016 01:05:53 +0000 (01:05 +0000)]
Added cl_bob_limit cvar which limits the maximum rage of view bobbing in a smooth way (rather than limiting the velocity and cl_bob independently, it limits the strength of the bob before the sinewave is applied). By default this is 7 (inspired by the quake limit of +4 to -7 range).
Added cl_bob_limit_heightcheck cvar (off by default) which uses tracelines to limit the maximum value of cl_bob_limit based on the ceiling and floor height.
Added cl_bob_velocity_limit cvar which replaces the hard-coded 400 in a few places for xyspeed purposes.
Overhauled quake3 shader loading such that it now produces shader passes that could render the material mostly correctly (rendering not yet implemented for the pre/post passes the logic identifies).
Main visible effect of this is that quake3 maps look more correct, but don't have any fancy effects yet.
This changed the loaders for all other formats that produce texture_t as texture->materialshaderpass-> is the new source of truth for several things.
Fix Q2BSP texture loading, Q2BSP contents issues, and add support for SURF_ALPHATEST for any maps that might use it, force fullbright rendering on SURF_TRANS33/SURF_TRANS66/SURF_WARP textures which fixes the rain in 3v3gloom3.bsp and chainlink fence textures on tkse.bsp and glass transparency on gloom1se.bsp among others. Also fix the SURF_FLOWING scroll rate when combined with SURF_WARP.
Also fixed the collision issues caused by stomping over Q1BSP data which caused traceline to break on Q1BSP after loading a Q2BSP map, thanks Supa for that bug report and finding other Q2BSP issues.
Changed naming of glsl/default.glsl and hlsl/default.hlsl to glsl/combined_crc*.glsl and hlsl/combined_crc*.hlsl - these are now effectively versioned by the crc of the builtin shader code, so if customization is applied it must match the current crc of the engine shader.
This should prevent any future shader version compatibility issues (at the cost of customization being harder to maintain).
Refactored shadermodeinfo related code to clean it up and make it more maintainable.
Overhauled shadowmap rendering to use an atlas texture, this is overall a speed loss on default settings (-7.7% fps on timedemo demo1, or -3% with r_shadow_deferred) but a gain on realtime world lighting (+21.1% normal, +1.7% with r_shadow_deferred) on NVIDIA GTX 680.
On video drivers with higher framebuffer switching costs, this should be a framerate gain in all situations.
Feature-wise this brings support (in future) for shadowmapping on transparent lit surfaces, and imposes an upper bound on how many pixels of shadowmaps will be rendered in a frame (shadowmap resolution automatically becomes more coarse on frames where they do not fit).
havoc [Sun, 28 Aug 2016 05:29:09 +0000 (05:29 +0000)]
Added r_shadow_bouncegrid_lightpathsize which is an alternative to blur
- but in practice this is just slower at a value of 3 than 1 is with
blur, so blur remains the default approach.
Implemented r_shadow_bouncegrid_floatcolors cvar which uses fp16 and
fp32 float formats to increase dynamic range.
Overhauled the default values of the bouncegrid cvars to look better.
havoc [Sat, 27 Aug 2016 22:28:59 +0000 (22:28 +0000)]
implemented r_shadow_bouncegrid_blur, this tremendously improves
quality at a cost of processing time, eliminating many rounding error
problems in all levels.
renamed several r_shadow_bouncegrid_* cvars to have a dynamic prefix,
and split spacing so that it can also be different between
static/dynamic modes (static now uses 32).
havoc [Sat, 27 Aug 2016 19:34:06 +0000 (19:34 +0000)]
Refactored r_shadow_bouncegrid light splatting code, it now makes an
array of light paths and then performs their splatting in a separate
step with an optional sort.
Implemented culling of out-of-view light paths in dynamic mode.
havoc [Sat, 27 Aug 2016 18:00:00 +0000 (18:00 +0000)]
Refactored r_shadow_bouncegrid code into several functions, changed
photon distribution math to make the photons more stable from frame to
frame (in dynamic mode), the number of photons fired is now based on
r_shadow_bouncegrid_intensityperphoton rather than always going for
maximum photons (accordingly r_shadow_bouncegrid_photons has been
renamed maxphotons and will still apply the old logic if it must).
havoc [Sat, 27 Aug 2016 03:17:49 +0000 (03:17 +0000)]
Fix a serious bug with r_shadow_bouncegrid_static where it used
R_CullBox and other view-dependent performance optimizations when
compiling the static texture - thanks to Vic for finding this bug!