Commit graph

2651 commits

Author SHA1 Message Date
Daniel Gibson
c6145b4e6a GL3: Only use FBO if under water
because on some systems (like RPi4 with my experimental GLES3 branch)
the overhead of a FBO is really noticeable, so no reason to pay for it
when it's not needed
2022-04-26 04:08:21 +02:00
David Carlier
df86c15395 frame cpu pause refactoring.
expanding to powerpc archs also for visual studio/MSVC while
keeping clang support for windows.
2022-04-25 18:17:46 +01:00
Daniel Gibson
3d619a1441 GL3: Implement underwater postprocess effect using framebuffer object
Can be disabled with gl3_usefbo 0.
Mostly this adds an underwater warping effect, like the soft-renderer,
and also like the vulkan renderer (the shader is based on the vk one).
When this is enabled, the v_blend effect (for fullscreen overlay with
one color, like when hit or to make the screen white-ish when under
water) is now applied in the shader used for rendering the FBO instead
of rendering a fullscreen quad in blendmode.
2022-04-25 17:44:51 +02:00
Yamagi
4db6534ab3 Implement damage tracking for the framecounter.
This fixes the framecounter in the soft renderer when `viewsize` is set
to something smaller than 100. This requires the renerer to rerender
bigger parts of the borders which has a measurable speed impact. About
5 frames less with the framecounter enabled on my system. No impact with
`viewsize 100`.
2022-04-24 00:17:48 +02:00
Yamagi
be3e0cc695 Fix viewsize not working correctly with the GL renderers.
The GL renderers require that the borders are redrawn after every
glClear() call, the damage tracking doesn't take that into account.
Since the speedup by the damage tracking is neglibiable in the GL
renderers, don't use it. Just redraw everything when we're running
with everthing which isn't the soft renderer.
2022-04-24 00:01:14 +02:00
Yamagi
a9a0c35a98 Rename the nightmare menu entry to hard+.
I think this looks ugly, I always called it nightmare and it was one of
the first changes I've made to Quake II. But for the sake of peace and
quiet change it to be standard conformant. Closes #809.
2022-04-23 16:35:27 +02:00
Yamagi
aa5d6636d6
Merge pull request #814 from protocultor/gamecontrollerdb
Load gamecontrollerdb.txt for SDL2 joy mappings
2022-04-23 16:21:09 +02:00
Denis Pauk
b2500d6aed soft: revert to use colormap
Apply light uses colormap for each color components with colorlights.
2022-04-17 23:25:22 +03:00
Denis Pauk
afc892001d soft: move light code to separate function 2022-04-17 23:07:38 +03:00
Denis Pauk
a58fb0ed01 soft: fix colors 2022-04-17 23:07:38 +03:00
Denis Pauk
96a78c41c8 soft: speedup apply grey light to wall 2022-04-17 23:07:38 +03:00
Denis Pauk
e1d5bad4db soft: fix grey light with fix c20c47b0 2022-04-17 23:07:38 +03:00
Jaime Moreira
45d8228dff Corrected silly string concatenation 2022-04-16 11:53:22 -04:00
Jaime Moreira
db0e643419 Load gamecontrollerdb.txt for SDL2 joy mappings 2022-04-16 01:37:15 -04:00
Yamagi
6e45f5a66b
Merge pull request #810 from protocultor/prefweap
Added prefweap command to select weapon by priority
2022-04-13 11:51:33 +02:00
Jaime Moreira
fadb281ec9 Added cvar to define SDL gamepad's 'Back' button 2022-04-06 22:15:14 -04:00
Jaime Moreira
f80e5224bb Added prefweap command to select weapon by priority 2022-04-06 15:28:34 -04:00
Yamagi
9d451faca5
Merge pull request #808 from devnexen/sw_useq
S/W last instance of strncpy usage.
2022-04-03 17:46:58 +02:00
Yamagi
8fa5ea3599
Merge pull request #807 from devnexen/config_settings_haiku
saving data into Haiku system user config.
2022-04-03 17:44:06 +02:00
David Carlier
2425082a04 S/W last instance of strncpy usage. 2022-04-03 14:58:04 +01:00
David Carlier
7ce0964b9b saving data into Haiku system user config. 2022-04-02 04:22:55 +00:00
Denis Pauk
ccb22843bf soft: use float for medium light 2022-03-29 22:29:28 +03:00
Denis Pauk
e650eff100 soft: preshift values in lightmap 2022-03-29 22:29:28 +03:00
Denis Pauk
020ce27109 soft: speedup colorlight=0
colorlight>0 is regressed little bit.
2022-03-29 22:29:28 +03:00
Denis Pauk
a0da1717cc soft: use max light in blocklights (colorlight=0) 2022-03-29 22:29:28 +03:00
Denis Pauk
3b825670ba soft: fix lightmap mask 2022-03-29 22:29:28 +03:00
Denis Pauk
c20c47b06f soft: skip light apply on wall's 2022-03-29 22:29:28 +03:00
Denis Pauk
ff1814922e soft: use vid_lightthreshold for skip apply light 2022-03-29 22:29:28 +03:00
Denis Pauk
c73eac63b3 soft: rename r_colorlight -> sw_colorlight 2022-03-29 22:29:28 +03:00
Denis Pauk
b5d45d0371 soft: use lightmap convert table 2022-03-29 22:29:28 +03:00
Denis Pauk
6af5dc1d98 soft: more use of light3_t 2022-03-29 22:29:28 +03:00
Denis Pauk
5eed0ca5d9 soft: reuse R_Alias_clip_scale 2022-03-29 22:29:28 +03:00
Denis Pauk
5fcf0a3afc soft: resuse compact vert_t 2022-03-29 22:29:28 +03:00
Denis Pauk
3f33522977 soft: use separate light3_t 2022-03-29 22:29:28 +03:00
Denis Pauk
480f278045 soft: directly copy r_ambientlight 2022-03-29 22:29:28 +03:00
Denis Pauk
6c80d9b987 soft: add full color light 2022-03-29 22:29:28 +03:00
Denis Pauk
a6839bc584 soft: add fullcolor light apply 2022-03-29 22:29:28 +03:00
Denis Pauk
15553b9971 soft: use plightvec directly 2022-03-29 22:29:28 +03:00
Denis Pauk
36542e737c soft: make pointcolor local 2022-03-29 22:29:28 +03:00
Denis Pauk
12b27e631d fix C --pedantic warnings
* extra semicolon in struct or union specified
* ISO C does not allow extra ‘;’ outside of a function
2022-03-29 22:29:28 +03:00
Denis Pauk
65f8c171c5 soft: use named struct vert_t instead array 2022-03-29 22:29:28 +03:00
Denis Pauk
f8cac738dc soft: sw_light: make variables local 2022-03-29 22:29:28 +03:00
Denis Pauk
512e128c5a soft: save full rgb light in model 2022-03-29 22:29:28 +03:00
Denis Pauk
7c31fd9de2 soft: sync model light calculation 2022-03-29 22:29:28 +03:00
Daniel Gibson
5535773521 GL1: Fix setting gl1_particle_square, fixes #805
both if GL pointparameters are used or not
(though depending on driver and hardware the pointparameters-based
 particles *might* be always square or always round, regardless of
 gl1_particle_square - that's driver-bugs which we can't fix, disable
 pointparameters with `gl1_pointparameters 0` to work around it, or
 just use the GL3 renderer)
2022-03-29 20:30:00 +02:00
Daniel Gibson
f7386eb296 Fix bug in (no)lerp logic in GL1
refs #805
2022-03-26 23:40:05 +01:00
Daniel Gibson
cc0eabffed Implement gl3_colorlight, when set to 0, render lights without color
like the (original) software renderer. defaults to 1, of course
2022-03-26 19:48:11 +01:00
Daniel Gibson
6eb9ca0f65 Add r_lerp_list and r_videos_unfiltered CVars, fix #800
r_lerp_list is to allow exceptions to r_2D_unfiltered (like for having
pixely UI in general, but filtered console background).

r_videos_unfiltered controls whether videos should be filtered or not

I also made r_nolerp_list CVAR_ARCHIVE, like users probably expect it.
2022-03-20 12:16:15 +01:00
Yamagi
3a528e608d
Merge pull request #796 from devnexen/few_simpl
habdful of little simplifications.
2022-03-12 17:10:35 +01:00
Daniel Gibson
09ede9cf47 Make basename() fully compliant and simplify it a bit 2022-03-12 17:01:37 +01:00
Daniel Gibson
6c41a60c6d Make it work with VS2015 and newer
the workaround is a bit ugly but should work..
(I only tested VS2017, but I guess 2015 should also work)
2022-03-12 17:01:37 +01:00
Daniel Gibson
d0507ef04a Win32 Sys_Quit(): Don't use printf() after fclose(stdout)
causes an assertion in MSVC's CRT
2022-03-12 17:01:37 +01:00
Daniel Gibson
4a02c790e9 MSVC: Don't use YQ2_VLA() in loops
because on MSVC it uses alloca() (or _malloca()) which mustn't be called
in loops, as the memory is only freed when returning from the function,
not when leaving the scope (or before the next loop iteration).

Instead do one "dry-run" iteration to figure out how big the array must
be at most, and then allocate it once before the loop with that size.
2022-03-12 17:01:37 +01:00
Daniel Gibson
37b1b708c6 Fix some legitimate warnings from MSVC
MultiByteToWideChar() and other functions handlings WCHAR strings usually
expect length-like arguments in number of WCHARs, not in size in bytes
2022-03-12 17:01:37 +01:00
Daniel Gibson
ed918cf423 CMake: Make the game build with Visual Studio (2019 16.8 or newer)
The easiest way to build this is to check out the dhewm3-libs project
(https://github.com/dhewm/dhewm3-libs/) to provide the dependencies
(SDL2, OpenAL, cURL) and set YQUAKE2LIBS accordingly, by passing
-DYQUAKE2LIBS=c:/path/to/dhewm3-libs/i686-w64-mingw32 to cmake.

I wouldn't really recommend building with MSVC - I just somehow made it
work and ignored all the warnings and I have no idea how portable the
resulting binaries are etc. For binaries you actually want to use, please
continue using MinGW-w64. Especially my workaround for VLAs (C99 variable
length arrays) is kinda fishy, particularly if those arrays are allocated
in a loop (that's inly done in ref_gl1.dll's code).

The only reason I did this is that I had to debug on Windows and, at least
for my specific bug, gdb didn't really work with binaries produced by
MingGW-w64 and MSVC's debugger works well with binaries produced by MSVC.

Currently requires VS 2019 16.8 or newer with C11 (/std:c11) because I
couldn't get YQ2_ALIGNAS_TYPE() to work with MSVC without _Alignas().
If we can get this to work, VS2015 or newer might suffice (but not older
versions, because their so called C standardlib didn't provide exotic
functions like snprintf()).

# Conflicts:
#	CMakeLists.txt
2022-03-12 16:55:55 +01:00
David Carlier
12509f6242 habdful of little simplifications. 2022-02-27 09:03:06 +00:00
Yamagi
fca041c3ea
Merge pull request #792 from devnexen/cl_parse_overflow_fix
CL_ParseEntityBits overflow warning fix
2022-02-26 16:19:17 +01:00
David Carlier
ff3315d5d6 Haiku doc update, little code style fixes. 2022-02-26 08:35:10 +00:00
David Carlier
ca4e5ef935 CL_ParseEntityBits overflow warning fix 2022-02-21 08:39:08 +00:00
Yamagi
e7df0977b0
Merge pull request #789 from apartfromtime/dev
Confirm delete save game through status bar update
2022-02-13 09:44:01 +01:00
apartfromtime
a7b90aaa24 Amend white-space error 2022-02-13 09:30:48 +11:00
Yamagi
b92165a0e1 Fix two unused var warnings introduced by #788. 2022-02-12 17:01:12 +01:00
apartfromtime
298a411b87 Confirm delete save game through status bar update 2022-02-12 14:56:08 +11:00
Denis Pauk
138fce15ea gl1,gl3: sync model light calculation 2022-02-05 18:54:38 +02:00
Denis Pauk
b4fb6db4fc gl1,gl3: rename gl_lightmap->r_lightmap 2022-02-05 18:54:38 +02:00
Denis Pauk
f1ac7cafbf soft: add r_lightmap implementation 2022-02-05 18:54:38 +02:00
Denis Pauk
eb979d73ed soft: resuse image load code for wal 2022-02-05 18:54:38 +02:00
Denis Pauk
0c2bf1f65d soft: use pixel_t in skin and load lightmap 2022-02-05 18:54:38 +02:00
Yamagi
7004565c72 Reset the clip mask in ThrowHead() to MASK_SHOT.
xatrix uses MASK_SHOT and it sounds saner than 0.
2022-02-05 17:26:48 +01:00
Yamagi
a0cd32dddb Fix door_go_up(), G_UseTargets() exiting early if no activator is given.
The problem in door_go_up() may prevent doors from crushing something
blocking them. The problem in G_UseTargets() may prevent targets from
getting killed or fired.

Pointed out by @maraakate.
2022-02-05 17:02:24 +01:00
Yamagi
9d827b13da Force an empty clip mask for thrown heads.
The ThrowHead() and ThrowClientHead() functions are special. They
transform the entity given in `self` (mostly the caller itself) into a
ripped off head. They don't reset the entities clip mask, which may
cause problems in interactions with other entities. Fix that by reseting
the clip mask to `0`. `0` should be save, because that's the default and
and least SV_TestEntityPosition() handles `0` clip masks.

Suggested by @BjossiAlfreds.
2022-02-05 16:55:12 +01:00
Yamagi
acf92bdd08 Add back call to rotation_blocked() lost in 896bb48.
If `ent->dmg` is `0` it's set to `2`:

```
if (!ent->dmg)
{
	ent->dmg = 2;
}
```

This enforces func_rotate dealing at least `2` damage points per tick.
Vanilla Quake II had this code a few lines below:

```
if (ent->dmg)
{
	ent->blocked = rotating_blocked;
}
```

The if clause is always true. PVS studio complained about that. By
mistake the whole block was removed, essentially preveting func_rotate
from freeing itself when blocked. This broke at least the 'Emulsifying
Flesh Press' in the fact2.bsp.

Closes #786.
2022-02-05 16:26:37 +01:00
Yamagi
896bb48d36
Merge pull request #780 from devnexen/m_main_draw_fix
menu code unused var warning fix.
2022-01-22 10:54:27 +01:00
Yamagi
aa561bf50b
Merge pull request #778 from 0lvin/fixes
cppcheck fixes
2022-01-22 10:51:21 +01:00
Yamagi
76e114b06a Bump version number to 8.02pre. 2022-01-22 09:51:53 +01:00
Yamagi
32fc209084 Bump version number to 8.01. 2022-01-22 09:51:28 +01:00
Denis Pauk
a48c7e1850 gl3: Scale 3x for nolerp 8bit textures 2022-01-18 00:02:54 +02:00
Denis Pauk
dcdc37ea35 gl1: Scale 3x for nolerp 8bit textures 2022-01-18 00:02:26 +02:00
David CARLIER
62fba5a29d menu code unused var warning fix. 2022-01-15 15:57:11 +00:00
Denis Pauk
f49235d28a disable sound effect debug prints 2022-01-13 22:54:21 +02:00
Denis Pauk
da4bbd64d6 soft: add const to functions parameters 2022-01-12 22:11:18 +02:00
Denis Pauk
68ad03aac9 sound: fix local variable 'ogg_file' shadows outer variable 2022-01-12 21:55:56 +02:00
Yamagi
6bec90bbdd Use Windows compatible format specifiers. 2022-01-08 18:05:36 +01:00
David Carlier
80ce342557 client curl update.
displaying download progress based on a new cvar, 0 by default.
2021-12-16 14:55:58 +00:00
BjossiAlfreds
65b1cd167c Moved code hacks for waste3 to waste3.ent and addressed more issues with that map 2021-12-11 14:02:09 +00:00
apartfromtime
aa0ad74e06 Multiplayer\Co-op menu customize controls 2021-11-24 18:42:18 +01:00
Yamagi
ec398e2df0 Mark game mode cvar as CVAR_SERVERINFO and CVAR_LATCH.
* `coop` and `deathmatch` were marked as CVAR_LATCH, `singleplayer` was
  not. Fix that by adding the flag to `singleplayer`.
* `coop` and `deathmatch` were marked CVAR_SERVERINFO in the server
  intitialization code. Mark both of them and `singleplayer` with
  CVAR_SERVERINFO as soon as we're initializing them the first time.

Pointed out by @BjossiAlfreds.
2021-11-13 12:22:14 +01:00
Yamagi
9f558dbc80 Initialize singleplayer as CVAR_LATCH.
Changing the game mode during a session screams for problems.
2021-11-13 12:22:14 +01:00
BjossiAlfreds
91e2cfdada gamemode command for getting info and switching gamemodes 2021-11-13 11:45:48 +01:00
BjossiAlfreds
37cfb61b1f Gamemode management improvements
Restored original gamemode prioritization to dm > coop > sp, fixed a bug where server start menu did not clear singleplayer cvar, and rewrote how server init manages gamemode cvars
2021-11-13 11:41:29 +01:00
Yamagi
09001d3bfb Normalize pathes passed to FS_FOpenFile().
There're some maps and maybe models or even mods in the wild which have
hardcoded paths with self references (`/./`) and / or empty diretories
(`//`). These assets works when read from the filesystem, but not when
read from PAK or ZIP files. Work around that by removing self references
and empty directories from the path right before opening the file.

Closes #767.
2021-11-13 11:09:01 +01:00
Yamagi
42d61449b1
Merge pull request #764 from BjossiAlfreds/playernoise
Fixed player_noise entity leak and improved stability surrounding player noises
2021-11-06 08:49:37 +01:00
BjossiAlfreds
6df8052f10 Fixed player_noise entity leak and improved stability surrounding player noises 2021-11-06 02:25:14 +00:00
Yamagi
a05508240f Disable the thread local stuff in stb_image.h, int breaks Windows.
The code is building fine but at startup the rendere library cannot by
loaded: "LoadLibrary returned 126" Disable thread local as a band-aid
fix, it might be worth to have a deeper look and figure out what exactly
goes wrong.

Closes #762.
2021-11-05 15:14:02 +01:00
Yamagi
84746289fa Move setting health for soldiers above SP_monster_soldier_x().
Otherwise the sound effects may desynchronize after savegame load.
Pointed out by @BjossiAlfreds.
2021-11-05 07:07:03 +01:00
Yamagi
e42d2736fa Fix soldiers never showing their pain skins as long as they're alive.
Since `self->helth` is set after calling `master_start()`
`self->max_health is always 0. Found by @drakonorodny and
analyzed by @BjossiAlfreds. Closes #761.
2021-11-04 18:35:47 +01:00
Yamagi
4456eccc8f
Merge pull request #760 from BjossiAlfreds/entalloc
Made the game able to handle entity overload better
2021-11-04 16:37:07 +01:00
Yamagi
8bb845b037 Fix potential memory leak in R_Upload8() in GL1.
This is a corner case, next to unlikely that anyone would have ever hit
it. That's why my tests with asan didn't find the leak. The if case are
paletted textures which must be enabled by setting `gl1_palettedtexture`
to 1 and requires an GPU with support for `GL_EXT_paletted_texture`.
Nvidia dropped support for that in 2005. Additionally a sky texture
must be uploaded.
2021-11-01 18:42:40 +01:00
Yamagi
b16b1b13d0
Merge pull request #758 from BjossiAlfreds/lateargs
Fixed incorrect handling of - in late args and simplified code
2021-11-01 18:35:30 +01:00
Yamagi
76b501b64b Update stb_vobis.h to af1a5bc.
This brings several small bugfixes and more robust handling of files
without comment / tag header. It's not mentioned in the changelog,
but at least for dhewm3 updating to this latest version fixed some
problems with missdecoded files on MacOS when running on the M1 aarch64
CPUs.
2021-11-01 16:49:47 +01:00
Yamagi
67f22cce17 Update std_image and stb_image_resize to af1a5bc.
This brings a lot of bugfixes, most of them are irrelevant for us. At
least as long as the game is run with standard assets...
2021-11-01 16:41:22 +01:00
Yamagi
5eba52008b Belatedly bump the version number to 8.01pre. 2021-10-31 17:25:55 +01:00
Yamagi
8dde5b8539 Replace hard coded array with malloc() to prevent stack overflow.
This was an issue an Windows with it's small stack. It didn't trigger on
Linux. While at it make the code a little bit more robust by allocating
exactly the amount of data we need and not some arbitrary guess.
2021-10-31 17:08:30 +01:00
Daniel Gibson
3873c76e12 Add r_2D_unfiltered CVar, improve r_nolerp_list handling
Setting r_2D_unfiltered to 1 (0 is default), 2D elements (GUI, menu,
console) are rendered without texture filtering in GL1 and GL3, while
everything else is still rendered with whatever is set in gl_texturemode

This setting (and now also gl_nolerp_list) is applied immediately,
so no vid_restart is needed.

refs #752
2021-10-30 20:42:43 +02:00
BjossiAlfreds
f6d9ffc45c Late args parser now uses one string build instead of two 2021-10-30 15:59:50 +00:00
Daniel Gibson
568602ab49 Support starting maps with '-' from commandline, fix #757
like ./quake2 +map sgc9-1
the problem was that everything from '-' to the next '+' (which starts
a command) was skipped; the intention of that (original Quake2) code
probably was to allow skipping something like "-datadir bla", though
Quake2 never supported arguments starting with '-' (until *we* added
-datadir and -portable); maybe that's a leftover from Quake1.
Anyway, the more correct way (that allows '-' in filenames) is to check
for a space before '-': so `quake2 +map base1 -portable` still works,
and now `quake2 +map sgc9-1` works as well
2021-10-30 17:04:18 +02:00
Yamagi
9a11251740
Merge pull request #742 from 0lvin/benchmark
Update for benchmark mode
2021-10-30 09:39:41 +02:00
BjossiAlfreds
c3b57bc81d Made the game able to handle entity overload better 2021-10-29 17:54:26 +00:00
BjossiAlfreds
ec28387da4 Fixed incorrect handling of - in late args and simplified code 2021-10-29 03:25:23 +00:00
Denis Pauk
1e0d75857b Use separate r_scale8bittextures for image scale
Rename {sw,gl}_retexturing variables to r_retexturing in code.
2021-10-17 11:11:05 +03:00
Denis Pauk
c280c408b1 dont collect statistics with cl_showfps=0 2021-10-16 23:27:56 +03:00
Denis Pauk
4eb2d95ccd limit timedemo to vid_maxfps * 5 2021-10-16 23:26:46 +03:00
Denis Pauk
fa1f5c2c84 Never sleep between frames with timedemo 2021-10-16 14:38:11 +03:00
Denis Pauk
012862b58d set currtime before Qcommon_Frame once
Make Qcommon_Frame and Qcommon_Mainloop static and minimize calls
for get current time, it takes 7% in some profiling cases.

We get current time twice before Qcommon_Frame(as Sys_Microseconds)
and inside it(as Sys_Milliseconds), and we can do it once.
2021-10-16 14:09:22 +03:00
Denis Pauk
11bb96401f soft: set current frame before use worldentity 2021-10-16 12:35:22 +03:00
Denis Pauk
7576d2d300 gl3: make currententity local 2021-10-16 12:35:04 +03:00
Denis Pauk
46c654b379 gl1: use local currentmodel 2021-10-16 12:34:32 +03:00
Denis Pauk
93ab5896e9 gl3: port submodel load code from vk render(8bd39ad5) 2021-10-16 12:34:23 +03:00
Denis Pauk
84773d7d79 gl3: use local model on load(35d598bc) 2021-10-16 12:34:15 +03:00
Denis Pauk
423c3fa299 gl3: preserve cache on free slots in image and models list(aa6032f0) 2021-10-16 12:33:51 +03:00
Denis Pauk
330830fc38 gl1: preserve cache on free slots in image and models list(aa6032f0) 2021-10-16 12:33:13 +03:00
Denis Pauk
e3a83c6b32 add const to Mod_ClusterPVS 2021-10-16 12:32:04 +03:00
Denis Pauk
f3f8c9a1f6 soft: make r_worldentity local 2021-10-15 23:39:34 +03:00
Denis Pauk
083cfca305 gl1: make currententity local 2021-10-15 23:37:56 +03:00
Denis Pauk
2d1a090feb gl: use local currentmodel 2021-10-15 23:37:56 +03:00
Denis Pauk
2c942d83f1 gl: use local model on load(35d598bc) 2021-10-15 23:37:56 +03:00
Denis Pauk
d8eb64cdcd gl1: port submodel load code from vk render(8bd39ad5) 2021-10-15 23:37:53 +03:00
Denis Pauk
34fb8d45b0 soft: Use common RadiusFromBounds 2021-10-15 23:30:56 +03:00
Denis Pauk
a9d6939297 gl: use lower MSAA value on error 2021-10-15 23:30:56 +03:00
Denis Pauk
0bbd65ebac gl1: Scale 8bit images with retexturing=2 2021-10-15 23:30:56 +03:00
Denis Pauk
58af4c84ff gl3: Scale 8bit images with retexturing=2 2021-10-15 23:30:56 +03:00
BjossiAlfreds
59f0462cc1 Fixed updated gunangles and gunoffset not always being sent to client 2021-10-14 02:06:52 +00:00
Yamagi
4b29329758
Merge pull request #748 from devnexen/sw_gl1_inleaf_sig_fix
sw/gl1 client Mod_PointInLeaf sig mismatch.
2021-10-13 17:30:35 +02:00
David Carlier
6cb2981c9c sw/gl1 client Mod_PointInLeaf sig mismatch. 2021-10-08 21:38:34 +01:00
Simon McVittie
d17c00dbd2 backends: Only enable ARM "RunFast" mode when targeting hardware FPU
Older ARM ABIs like Debian armel (ARMv5 EABI softfloat) don't use
or require a hardware FPU, so they can't execute the fmrx and fmxr
instructions. Only do this in hardfloat configurations that guarantee
VFP instructions are available.

The client might not be practically usable on ARM softfloat (although
nobody has reported that it isn't...) but the dedicated server is probably
fine, and ceasing to be able to build either would be a regression.

Signed-off-by: Simon McVittie <smcv@debian.org>
2021-10-05 14:05:15 +01:00
Yamagi
f4f61c1f27 Add g_machinegun_norecoil to the list of cheat proteced cvars. 2021-09-28 18:37:56 +02:00
De-Seppe
b471578c3e Rename variable to conform to naming guidelines
Change the name of the cvar machinegun_norecoil to g_machinegun_norecoil to conform to the naming guidelines
2021-09-27 18:29:37 +02:00
De-Seppe
41a134a195 Add cvar machinegun_norecoil
Add cvar machinegun_norecoil
This cvar allows to disable machinegun recoil in single player.
The default value is the original Quake 2 behaviour.
2021-09-27 12:56:22 +02:00
apartfromtime
a737500f89 Consistent naming 2021-09-21 14:18:25 +10:00
Yamagi
1ff3760c76 Refine the g_footstep cvar.
There were complains that always generating footsteps is annoying,
because there will be footsteps while swimming or jumping. Refine
the cvar a little bit:

* `0`: No footsteps at all.
* `1`: Vanilla Quake II behavior.
* `2`: Always footsteps as long as the player has a ground entity.
* `3`: Always footsteps.

The changes the meaning of the values, `2` has become `3`.

Closes #738.
2021-08-25 18:34:24 +02:00
Denis Pauk
ea272241a4 soft: Use SmoothColorImage as r_anisotropic 2021-08-08 23:34:47 +03:00
Denis Pauk
aa6032f00f soft: preserve cache on free slots in image and models list 2021-08-08 17:43:14 +03:00
Denis Pauk
35d598bce6 soft: use local model on load 2021-08-07 23:03:48 +03:00
Denis Pauk
8bd39ad5dd soft: port submodel load code from vk render 2021-08-07 17:24:39 +03:00
Denis Pauk
a8b02d4725 Sound: unload only on run of slots 2021-08-07 10:38:02 +03:00
DC
bc6a40e27e little memory leak possible when the .pak matches 2021-08-06 16:29:16 +01:00
Yamagi
0f7790c8e3 Remove code unnecessary / redundant since last commit. 2021-08-02 09:09:31 +02:00
Yamagi
7db0a89fe1 Refactor filtering if numbered paks.
For historical reasons numbered paks must be loaded before all other
paks. The logic is easy: Add all numbered paks. Iterate over all
available paks, filter out numbered paks and add everything that's left.

Until now a simple glob comparisson against 'pak*' was used for the
filtering. This has two problems:

1. All paks starting with 'pak*' were filtered, regardless if they're
   numbered paks or not.
2. Upper case or mixed case file names that are valid on caseinsenstive
   systems like Windows weren't recognized as numbered paks and added
   twice. Once as numbered pak and once as other pak.

Refactor the logic to only match paks starting with 'pak%d' and use
strcasecmp() for comparison. Closed #730.
2021-08-02 08:44:49 +02:00
Yamagi
e2e2bddfa3 Fix demo loop after changing the game through the menu.
Injecting the demo loop right after the `game` cvar was changed cannot
work: The demo loop is implemented through aliases, aliases are expended
as soon as they're added to the command buffer. However, the game isn't
changed as soon as the cvar is set, but the next time when the control
flow enters the file system. Therefor the aliases get expanded to the
wrong game and the demo loops breaks.

This closes #719.
2021-07-25 09:45:51 +02:00
Yamagi
8358e386fc
Merge pull request #722 from 0lvin/gamepad
Sync haptic feedback with sound track
2021-06-30 07:28:51 +02:00