Commit graph

202 commits

Author SHA1 Message Date
Denis Pauk
7d3545abd7 Merge remote-tracking branch 'yquake2/master' 2024-08-09 01:35:40 +03:00
Yamagi
8cc3361730 Hardcode the SDL audio driver (again) to directsound under Windows.
Windows defaults to `wassapi`, which is a sensible choice. But WASAPI
only guarantees 32 bit float samples, anything else only works if the
driver or something supports it and YQ2 requires 16 bit samples. That
can be worked around by having SDL recode the audio, but I don't want
such a invasive change right before a release.

Another part of #1132.
2024-08-08 18:43:03 +02:00
Yamagi
b3c47df0c8 Don't overwrite SDLs audio driver selection.
Hardcoding default driver for some of the supported platform is a
remnant of SDL 1.2 and hasn't been necessary since SDL 2.0 a long
time ago. In fact it has a high properbility to break things, SDL
could easily end up with a non working driver.

When `s_sdldriver` is set to the newly introduced value `auto` the
driver is selected by SDL. In all other cases the string is the
driver name which SDL will be forced to.

This doesn't fix existing configs. Since the OpenAL sound backend has
been the default for nearly 15 years and we haven't received bug reports
for some other problem with the SDL sound backend in the past, I'm half
sure that there are next to users out there. These can reset the cvar
by hand if necessary.

Closes #1132.
2024-08-07 12:04:54 +02:00
Denis Pauk
6c16fe1e8e Merge remote-tracking branch 'yquake2/master' 2024-07-21 18:07:00 +03:00
Yamagi
eef7db91d8
Merge pull request #1124 from protocultor/gl1_buffer
Grouped draw calls for improved performance with GL1
2024-07-20 09:24:23 +02:00
Denis Pauk
1e0aa094cb Merge remote-tracking branch 'yquake2/master' 2024-07-15 23:37:05 +03:00
Yamagi
4b9b8e14a4 Switch g_quick_weap to 1 by default.
It's a nice to have convenience feature that most players will never
notice. Die hard traditionalists can switch it off.
2024-07-15 21:42:15 +02:00
Jaime Moreira
15a1ebdd74 Deleted gl1_biglightmaps
glTexSubImage2D() calls are very slow, and are even slower when
the texture is big. Dynamic lighting changes are small compared
to the huge 512x512 size of the lightmap this option provided,
so it was detrimental to performance.
Original logic remains underneath if there's a need of a comeback.
2024-07-15 12:45:15 -04:00
Denis Pauk
96b8707825 Merge remote-tracking branch 'yquake2/master' 2024-06-30 23:06:16 +03:00
Yamagi
1a1b32961b Refactor the download filter.
The first try didn't take into account that an evil server could
override the filter list by sending a stuff command. Fix this by
hardcoding the filters for .dll, .dylib and .so. Make sure that the
filters are always applied, either when the download is requested
through the `download` command or because game data is missing.

This is just a poor mans fix, trying to rule out an obvious way to
inject code into the client.
2024-06-24 11:56:11 +02:00
Denis Pauk
d15bb81e58 Merge remote-tracking branch 'yquake2/master' 2024-06-22 23:57:29 +03:00
Yamagi
5e6a73dc3f Include downloads into the security considerations. 2024-06-22 16:57:30 +02:00
Yamagi
468f90ad48 Implement a simple download filter.
`cl_nodownload_list` is a whitespace seperated list of strings, files
containing one of these strings in their name are never downloaded. Set
to `.dll .dylib .so` by default to prevent downloading libraries which
can be injected into client.

Closes #1114.
2024-06-22 16:56:42 +02:00
Yamagi
d5c7845271 Fix formating of the cvarlist. 2024-06-22 16:50:54 +02:00
Denis Pauk
330b1352fb Add macos test build on release tag 2024-06-22 17:35:25 +03:00
Denis Pauk
1775874418 Merge remote-tracking branch 'yquake2/master' 2024-06-08 22:47:14 +03:00
Jaime Moreira
c4271848df gl1_multitexture doc update 2024-06-04 16:21:10 -04:00
Jaime Moreira
24b03b61f8 Gyro tightening
A practical way to avoid a noisy gyro signal, or shaky hands.
Unlike a deadzone, inputs below the threshold are "squeezed towards
zero", so they are not completely ignored. Source:
http://gyrowiki.jibbsmart.com/blog:good-gyro-controls-part-1:the-gyro-is-a-mouse#toc9
2024-06-04 15:48:42 -04:00
Denis Pauk
faf86b72c5 GL1 big lightmaps and scrap
https://github.com/yquake2/yquake2/pull/1108

Merge remote-tracking branch 'yquake2/master'
2024-05-27 08:41:53 +03:00
Denis Pauk
e00ab4ffde game: fix save of quake monsters 2024-05-15 00:43:42 +03:00
Denis Pauk
33a3aed03e GL1 multitexture
Merge changes from https://github.com/yquake2/yquake2/pull/1103
Merge remote-tracking branch 'yquake2/master'
2024-05-12 12:55:53 +03:00
Jaime Moreira
0f307cc9c1 GL1 scrap/atlas configurable size
Controlled by gl1_biglightmaps cvar, works like new lightmaps.
Max size is 384x384; a bigger size is not justified.
Added a transparent border so colors from one picture don't bleed
into the next.
2024-05-11 18:20:13 -04:00
Jaime Moreira
81fd2c1027 Increased lightmap size in GL1
Controlled by new cvar, gl1_biglightmaps.
Size is now up to 512x512, for a max quantity of 8 lightmaps.
Should reduce rebinding of them, and reduce the number of calls
to glTexSubImage2D(), although it may increase data transfer on
each call.
2024-05-11 18:18:28 -04:00
Jaime Moreira
86528d7812 GL1 multitexture, first version
Unlike the old, buggy one, this implementation follows the
texture chain, just like the standard execution path. It also
avoids doing the lightmap chains, since it has already done it
in the second TMU; there's no duplicated work for lightmaps.
No errors appear in the lava on the "boss1" map either.
It's still slow when having an overdraw of dynamic lights.
Further work is needed.
2024-04-23 12:25:38 -04:00
Denis Pauk
02b8e85c01 opengl renders: support of gl_version_override cvar
Provides way to check render with lower officialy
reported OpenGL version.

Same as:
* MESA_GL_VERSION_OVERRIDE=4.6
* MESA_GLSL_VERSION_OVERRIDE=460
2024-04-13 13:25:34 +03:00
Denis Pauk
4bd19bf982 Merge remote-tracking branch 'yquake2/master' 2024-04-07 18:12:09 +03:00
Yamagi
8a9e31ab86 Clearify vid_gamma in the GL1 renderer. 2024-04-07 11:01:45 +02:00
Yamagi
e61d9444c9 Bump default renderer to GL3...
...and alter the render finding and fallback sequences to include GLES3
as the first fallback. This should have been done years ago, when GL3
became the clear better option above GL1.
2024-04-07 11:01:45 +02:00
Yamagi
af82cfe978 Switch the default for vid_highdpiaware to 1 when build against SDL3.
With SDL3 the high dpi support is in much better shape than with SDL2.
And for Wayland the experience on high dpi displays is generally better
when the application is high dpi aware.
2024-04-07 11:01:45 +02:00
Denis Pauk
80a4282ec7 Merge remote-tracking branch 'yquake2/master' 2024-04-01 23:22:25 +03:00
BjossiAlfreds
c134d0127d Added cvar cl_laseralpha and documentation in cvarlist 2024-03-31 10:45:31 +00:00
Denis Pauk
d1e23ae740 maps: initial flags surface flags convert
Convert map flags before load for load maps files from games with
different flags meaning.
2024-03-30 19:12:06 +02:00
Denis Pauk
c385789a87 Merge remote-tracking branch 'yquake2/master' 2024-03-19 22:12:01 +02:00
Feels Duck Man
086084b507 Added documentation for 'cl_showspeed' in 040_cvarlist.md 2024-03-18 21:21:59 -05:00
Denis Pauk
6973181a21 client: bump protocol and game version / unstable compatibility
Config string numbers is different to original Quake 2 code,
code is not compatible with any version of official protocols or
game code. And game code should be recompiled for use with engine.
2024-02-29 00:05:21 +02:00
Denis Pauk
a3d450ff64 client: Add gametype variable
`gametype` variable could be used for show menu for different
embeded mod type. Remaster has all ctf/rogue/xatrix maps in baseq2
directory and menu could not detected by game variable anymore.
2024-02-23 00:33:24 +02:00
Denis Pauk
b21391954d game: fix shambler effect 2024-02-11 23:51:33 +02:00
Denis Pauk
47bacf9a52 game: Add support some of quake 1 monsters
Shambler is left without chenges and fixes for now.
2024-02-11 19:10:57 +02:00
Denis Pauk
9b3b4b44df Merge remote-tracking branch 'yquake2/master' 2024-01-07 14:51:26 +02:00
Jaime Moreira
fb46007bc3 Fixed gl1_overbrightbits limiter, for real now
Allowed values are 0, 1, 2 and 4 only.
Updated documentation, again.
2024-01-06 13:32:48 -03:00
Denis Pauk
70b0b1c77a Update windows build instruction 2023-12-25 00:05:38 +02:00
Denis Pauk
6b4f197ac0 game: Add third person view
Based on codes:
 * Lazarus mod
 * KMQuake2 codes
 * Slight Mechanical Destruction mod

https://bitbucket.org/Knightmare66/kmquake2_stable/src/master/game/p_chase.c
2023-12-25 00:05:38 +02:00
Denis Pauk
642aeedc43 Merge remote-tracking branch 'yquake2/master' 2023-12-18 12:47:09 +02:00
Jaime Moreira
9eca08fd92 Faster "weapprev" and "weapnext" behavior
These commands can now "count" how many times they have been called,
similar to how "cycleweap" operates after #865.
This allows for changing to different weapons, instead of just going
"one down" or "one up".
New cvar "g_quick_swap" allows to enable/disable this behavior.
2023-12-07 23:57:19 -03:00
Denis Pauk
258d041b5d cin: Add ogv video support 2023-10-27 19:43:41 +03:00
Denis Pauk
96b4037ac7 Merge remote-tracking branch 'yquake2/master' 2023-10-20 22:53:04 +03:00
Jaime Moreira
fa218c9f4c Fixed gl1_overbrightbits limiter
Allows values between 0 and 4. Updated documentation.
2023-10-18 20:35:51 -03:00
Denis Pauk
586d62d4de server: badlands hack 2023-10-17 00:16:05 +03:00
Denis Pauk
83a31973c2 Add transparent with alpha test surface support
Based on surface flag from kmquake2 and rerelease documatation

https://github.com/id-Software/quake2-rerelease-dll#surf_alphatest-bit-25
2023-10-16 00:35:40 +03:00
Denis Pauk
b4e78d0fa3 vk,gl1: Fix mgu2m3 2023-10-15 23:09:05 +03:00