Commit graph

3344 commits

Author SHA1 Message Date
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
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