havoc [Wed, 8 Jun 2011 19:23:52 +0000 (19:23 +0000)]
reworked progs loading so that entvars_t and globalvars_t are no longer
required to match (if they do match, the relevant fields will match the
structs, otherwise name lookups are used), this means the PROGHEADER_CRC
no longer has to match either... and same for csqc and menuqc
havoc [Wed, 8 Jun 2011 18:03:19 +0000 (18:03 +0000)]
eliminated S_LockSfx and S_UnlockSfx which were not thread-safe and
could cause sounds to leak across multiple levels, cd play/loop now
immediately unload previous music track
havoc [Wed, 8 Jun 2011 17:36:16 +0000 (17:36 +0000)]
implemented r_transparent_alphatocoverage 2 which promotes alphablend if
desired to ATC, the default is 1 (only promotes alphatest)
enable GL_MULTISAMPLE during extension detection to make things work
havoc [Wed, 8 Jun 2011 13:33:46 +0000 (13:33 +0000)]
reworked use of alphatest - now only GL11/GL13/GLES1 paths use it, other
paths use SHADERPERMUTATION_ALPHAKILL (including the SOFT path)
reworked r_transparent_alphatocoverage, it no longer needs
vid_multisampling
divverent [Fri, 3 Jun 2011 20:18:37 +0000 (20:18 +0000)]
new cvars: snd_startloopingsounds, snd_startnonloopingsounds
Use cases:
1. playing mods with bugs where looping sounds never end, annoying
2. implementing demo seeking via cfg file tricks (turn off non-looping sounds
during high slowmo values used for seeking)
divverent [Tue, 31 May 2011 20:25:01 +0000 (20:25 +0000)]
viewmodel matrix fixes:
- have two separate viewmodel matrices, one that only applies the viewmodel
scale (for EF_NOGUNBOB), and one that contains bobbing etc. effects
- recalculate both matrices properly when using R_SetView() from CSQC
- make sure view parameters are consistent between whether R_SetView() is
called or not
- fix missing viewmodel scale in intermission
havoc [Sat, 28 May 2011 17:50:38 +0000 (17:50 +0000)]
reworked sv_gameplayfix_nudgeoutofsolid, it now begins with an enlarged
start position test and nudges out of solids, then does the move, this
should reduce collision issues with triangle mesh brushes in steelstorm,
renamed sv_gameplayfix_nudgeoutofsolid_bias to
sv_gameplayfix_nudgeoutofsolid_separation with 0.03125 as default
divverent [Fri, 27 May 2011 16:58:46 +0000 (16:58 +0000)]
call SetDllDirectory on Win32 too
Usage: put DLLs in a bin32/ subdir for that
If not done, binaries work as before.
This is the only way to have a 32bit and 64bit executable version in the same
directory! Otherwise Windows will abort DLL search at the 32bit DLL, which
fails to load into a 64bit process.
NOTE: this requires WinXP SP1 and above. To compile with this functionality
disabled, compile with -DDONT_USE_SETDLLDIRECTORY added to the CFLAGS.
havoc [Mon, 23 May 2011 15:49:45 +0000 (15:49 +0000)]
honor ent->shadertime in all material handling (tcmod, etc)
do frame looping properly on q3 shader animmap (no more precision issues)
wrap tcmod scroll so that it does not have precision breakdown
changed rsurface.ent_shadertime to rsurface.shadertime which is now
relative time (what should be used)
havoc [Mon, 23 May 2011 15:46:32 +0000 (15:46 +0000)]
added LoopingFrameNumberFromDouble function to do this operation
correctly (using divide, floor, and multiply), since doing it the lazy
way (cast to int, use modulus operator) breaks down after a certain
amount of time in the level
havoc [Mon, 23 May 2011 09:41:52 +0000 (09:41 +0000)]
fix a crash in debug builds where the compiler did not optimize
ch->sfx-> to use a local variable holding the unchanging value of sfx
(the crash occurs when the mixer thread clears ch->sfx while the main
thread is deciding whether to merge a sound onto an existing channel -
if the channel dies during this code, the sfx pointer must be preserved)
vortex [Fri, 20 May 2011 20:27:10 +0000 (20:27 +0000)]
Added "loadcubemap" builtin to allow preload cubemaps level can use, added experimental "r_water_lowquality" which reduces options while rendering water planes, this can help a bit. Added "gl_texturecompression_sprites" cvar.
havoc [Thu, 19 May 2011 01:33:42 +0000 (01:33 +0000)]
added JOY_UP/DOWN/LEFT/RIGHT keys which are a more general form of the joy_axiskeyevents cvar (which when set to 1 will turn these into UPARROW/DOWNARROW/etc as before, but this way a menu qc can respond to them correctly)
havoc [Thu, 19 May 2011 01:21:10 +0000 (01:21 +0000)]
XInput code path no longer emulates arrow keys in menu by default, instead this is based purely on the joy_axiskeyevents cvar (and no longer cares if it is the menu or not)
havoc [Wed, 18 May 2011 13:18:43 +0000 (13:18 +0000)]
implemented support for Windows XInput (using different keys/cvars to allow non-conflicting configs) in vid_shared.c, usable in WGL and SDL clients on Windows
redesigned joystick code to encode any joystick data into a vid_joystate_t struct and use a common code path for all handling of axes and button events (also rewrote joy_axiskeyevents as part of this)
changed joystick deadzone handling to make values start at 0 at the edge of the deadzone
removed legacy joystick code in vid_wgl.c because it was too annoying to maintain
removed some hacky SDL 1.3 iOS code that is no longer needed
divverent [Sat, 14 May 2011 16:16:08 +0000 (16:16 +0000)]
A temporary hack for GAME_XONOTIC only
this commit adds getplayerkey(..., "TEMPHACK_origin") to get a networked
player's origin from csqc; it returns the empty string if the extension is not
supported, or the player is not known to the engine at the moment
vortex [Fri, 13 May 2011 21:37:16 +0000 (21:37 +0000)]
Multisampling initialisation moved from vid_sdl to gl_backend. Make cubemaps array dynamic (segments are allocated on load), this uses less memory, and MAX_CUBEMAPS was raised.
vortex [Wed, 11 May 2011 22:59:39 +0000 (22:59 +0000)]
OpenGL 2.0 path: Make handling of Alpha-To-Coverage same as AlphaTest (enabling before surface render and disabling after), instead of hacky R_ShadowMode_Begin force-to-disable, this also fixes shadowmap bug with ATI hardware. Also made vid_multisampling (if enabled) to force minimal vid_samples 2.
havoc [Mon, 9 May 2011 20:20:37 +0000 (20:20 +0000)]
added prvm_offsets.h which centralizes field/global/function lookups for
easier maintenance, this file is included with a huge set of macros for
each different purpose...
havoc [Mon, 9 May 2011 17:56:56 +0000 (17:56 +0000)]
reworked PRVM_EDICTFIELD* and PRVM_GLOBALFIELD* usage to have more
specific naming of the macros, and allow code analysis to audit the used
fields/globals for better maintenance
vortex [Sun, 8 May 2011 21:55:18 +0000 (21:55 +0000)]
GL_ARB_multisampling defs (vid_multisampling) and alpha-to-coverage effect (r_transparent_alphatocoverage) for alphaTest surfaces, which dont use multisampling yet but looks better for most cases, especially for overhead games.
havoc [Sun, 8 May 2011 13:49:35 +0000 (13:49 +0000)]
fixed RF_VIEWMODEL really good this time
renamed cl.csqc_origin to cl.csqc_vieworigin, cl.csqc_angles to
cl.csqc_viewangles, and added cl.csqc_vieworiginfromengine and
cl.csqc_viewanglesfromengine which are used to restore the view
parameters when R_ClearScene is used in csqc