Commit graph

3228 commits

Author SHA1 Message Date
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
Yamagi
a0a8521497 Update CHANGELOG for 8.01.
This will be mostly a bugfix release.
2022-01-08 15:55:09 +01:00
Yamagi
d8c8bb0ba7
Merge pull request #775 from devnexen/curl_update_progress
client curl update proposal.
2021-12-24 08:52:55 +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
Yamagi
f32d1e2ed7
Merge pull request #774 from BjossiAlfreds/waste3-fixes
Moved code hacks for waste3 to waste3.ent
2021-12-11 19:07:33 +01:00
Yamagi
76440d2a97
Merge pull request #771 from VespuCore/patch-1
Change the amount of listed renderers to 3 in documentation
2021-12-11 19:05:32 +01:00
BjossiAlfreds
b4ded6cb4f Additional fix for missing sound effect in waste3 in DM 2021-12-11 14:29:13 +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
Markuss Mišķis
f7999d74a3
Change the amount of Renderers to 3
Since Vulkan is missing from the list.
2021-11-28 02:12:48 +02: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
Yamagi
b0fb26c6aa Document the gamemode command. 2021-11-13 12:22:06 +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
Yamagi
9de9939fe0
Merge pull request #751 from BjossiAlfreds/weapframe
Fixed updated gunangles and gunoffset not always being sent to client
2021-10-25 10:10:49 +02: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