Commit graph

3156 commits

Author SHA1 Message Date
Denis Pauk
5b7696b789 game: sync game logic from xatrix 2023-10-21 02:28:43 +03:00
Denis Pauk
0956f965f7 game: sync up xatrix player 2023-10-21 01:12:13 +03:00
Denis Pauk
689e54c7eb game: sync up all xatrix monsters 2023-10-21 00:45:32 +03:00
Denis Pauk
f26caa7e72 gl1,vk,soft: fix open player model select 2023-10-20 22:54:02 +03:00
Denis Pauk
5ca0b0ce5d game: sync flipper and float with xatrix 2023-10-20 22:54:02 +03:00
Denis Pauk
00fc171350 game: sync boss3 with rogue 2023-10-20 22:54:02 +03:00
Denis Pauk
2dcad44128 game: sync boss2,boss3,brain and chick with xatrix 2023-10-20 22:54:02 +03:00
Denis Pauk
159dde8c2f game: combine monsters from separate files
Move to game all monsters defined in separate files, without real
usage for now.
2023-10-20 22:54:02 +03:00
Denis Pauk
9702700225 Temporary build rogue as separate library 2023-10-20 22:54:02 +03:00
Denis Pauk
0826949edc Fix curl warnings 2023-10-20 22:54:02 +03:00
Denis Pauk
7f74db318b Temporary build xatrix as separate library 2023-10-20 22:54:02 +03:00
Denis Pauk
96b4037ac7 Merge remote-tracking branch 'yquake2/master' 2023-10-20 22:53:04 +03:00
Jaime Moreira
36bf9de5a8 Typos 2023-10-18 20:37:49 -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
7b50b2d89f game: Sync game/header/game.h, game/header/local.h 2023-10-18 19:40:55 +03:00
Denis Pauk
748cc322b3 client: Add ReRelease music files 2023-10-17 23:04:59 +03:00
Denis Pauk
cfe2f27fae Simplify SURF_ALPHATEST code
Fix for https://github.com/yquake2/yquake2/issues/956
2023-10-17 18:55:55 +03:00
Denis Pauk
586d62d4de server: badlands hack 2023-10-17 00:16:05 +03:00
Denis Pauk
858aa85c6a Merge remote-tracking branch 'yquake2/master' 2023-10-17 00:10:04 +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
Denis Pauk
c3c80593c8 gl1,vk: reuse initial shared lightmap buffer 2023-10-15 21:29:10 +03:00
Denis Pauk
0506b02c60 gl1: Fix mgu3m2 2023-10-15 19:58:33 +03:00
Yamagi
5c642b6a5b
Merge pull request #1061 from DanielGibson/curl-uaf-fix
Fix use-after-free bugs in htttp download code
2023-10-15 18:09:25 +02:00
Denis Pauk
fd7cb11f92 files/light: add output buffer size check and desync LM sizes
Partial revert 660f5728.

After sync lightmaps generation is broken for gl1, revert sync
for now.
2023-10-15 19:00:49 +03:00
Denis Pauk
e17db97176 gl1: Temporary revert back Lightmap size to fix lights
Fix 1ab6214f, 660f5728
2023-10-15 16:41:52 +03:00
Denis Pauk
660f5728c1 gl1,gl3,gl4,vk: Sync LM size
Need to search way to dynamically change prefered lightmap texture
size and sync LM caching structures and code.

internal_format is always GL_LIGHTMAP_FORMAT so just directly use
constant instead set to variable.
2023-10-15 14:47:54 +03:00
Denis Pauk
1ab6214ff0 gl1,vk: move s_blocklights reallocation to files/light 2023-10-15 13:51:15 +03:00
Denis Pauk
2790b0de92 Fix lightmap temporary buffer size calculation
Introduced in a1249534, fixed load of mgu3m2 in vk render.
2023-10-15 12:49:15 +03:00
Denis Pauk
b54dc5559d Fix LoadMarksurfaces loads 2023-10-14 17:17:03 +03:00
Denis Pauk
c91dc0b9b2 Share R_PushDlights between all renders 2023-10-14 02:08:30 +03:00
Denis Pauk
4dbb6eb4bc Share R_MarkSurfaceLights between all renders 2023-10-14 01:32:19 +03:00
Denis Pauk
a124953432 gl1,vk: share R_BuildLightMap 2023-10-14 00:42:06 +03:00
Denis Pauk
0dde2cc731 gl1,vk: share R_AddDynamicLights 2023-10-13 23:33:35 +03:00
Denis Pauk
85c18a8090 gl1,vk: Share SetCacheState and fix q64/outpost 2023-10-13 18:30:52 +03:00
Denis Pauk
9874f1a6c0 vk:Reuse internal vertex format in poligon and skybox shaders 2023-10-13 00:26:21 +03:00
Denis Pauk
8694aebb20 vk:Reuse internal vertex format in lightmap shaders 2023-10-13 00:25:40 +03:00
Denis Pauk
7084e8d7cd Change code version to 'ReRelease 8.21.1' 2023-10-12 18:46:04 +03:00
Denis Pauk
19b29c648f gl3,gl4,vk: Share R_MakeSkyVec 2023-10-12 01:07:13 +03:00
Denis Pauk
03bfc581e2 gl1,gl3,gl4,vk: Parial share of warp code 2023-10-12 00:29:47 +03:00
Denis Pauk
d47d27ca00 Remove surface check
Soft render has issues with q64/outpost
2023-10-11 20:39:14 +03:00
Denis Pauk
8fb649709e Sync code style in sky warp functions 2023-10-11 20:14:07 +03:00
Denis Pauk
3e7b568ec9 Sync allocation sizes between renders 2023-10-11 00:19:52 +03:00
Denis Pauk
bd19960ddf Fix Hunk size calculation introdused in 371fb99c
Used LUMP_LEAFS instead LUMP_TEXINFO.
2023-10-10 01:27:10 +03:00
Denis Pauk
d26c9275f9 Fix leafbrushes allocation from e276ac80 2023-10-10 01:00:54 +03:00
Denis Pauk
3e1a3c6328 Revert back all limits
Code has issues with calculation of hunk size and mguhub load.
2023-10-10 00:43:19 +03:00
Denis Pauk
371fb99c50 Use hunk allocation for CMod_LoadSurfaces 2023-10-10 00:00:27 +03:00
Denis Pauk
9c55d2fe0f Use hunk allocation for CMod_LoadQLeafs 2023-10-09 23:58:42 +03:00
Denis Pauk
e276ac80a7 Use hunk allocation for CMod_LoadLeafBrushes 2023-10-09 23:56:12 +03:00
Denis Pauk
c5ed6f6ad8 Reuse Mod_LoadPlanes in renders and collision 2023-10-09 23:53:45 +03:00
Denis Pauk
6f0bf02ece Use hunk allocation for CMod_LoadBrushes 2023-10-09 23:49:43 +03:00
Denis Pauk
222244839d Use hunk allocation for CMod_LoadBrushSides 2023-10-09 00:59:29 +03:00
Denis Pauk
31c09bca3c Left CMod_LoadSubmodels with static allocation
Subcmodel is still statically allocated as big
ammount of code expect to access it after model cleanup
2023-10-09 00:00:02 +03:00
Denis Pauk
d860ba7762 Reuse Mod_LoadVisibility between renders and collision code 2023-10-08 18:43:36 +03:00
Denis Pauk
56a205c606 Use hunk allocation for CMod_LoadNodes 2023-10-08 18:42:58 +03:00
Denis Pauk
a89ff8c0a0 Use hunk allocation for CMod_LoadAreas 2023-10-08 15:19:33 +03:00
Denis Pauk
703d281391 Use hunk allocation for CMod_LoadAreaPortals 2023-10-08 14:21:19 +03:00
Denis Pauk
783c703b28 Use hunk allocation for CMod_LoadVisibility 2023-10-08 14:06:06 +03:00
Denis Pauk
b56df03b76 Initial server model load code with hunk alloc 2023-10-08 00:47:53 +03:00
Denis Pauk
f3b2a9c4bf Share R_SubdivideSurface between renders 2023-10-07 23:00:21 +03:00
Denis Pauk
4c4d244788 Implement Com_Error in renders 2023-10-07 18:52:23 +03:00
Denis Pauk
edfd93802b sync usage r_dynamic and r_dynamic 2023-10-07 18:08:33 +03:00
Denis Pauk
b1b3ff1992 Share Mod_LoadQBSPEdges between renders 2023-10-07 16:37:42 +03:00
Denis Pauk
d2468c9b66 Share Mod_LoadQBSPMarksurfaces between renders 2023-10-07 16:13:48 +03:00
Denis Pauk
d6de468c49 Share Mod_LoadQBSPNodes between renders 2023-10-07 15:24:02 +03:00
Denis Pauk
1121407e39 Share Mod_LoadQBSPLeafs between renders 2023-10-07 15:11:42 +03:00
Denis Pauk
073f9896f4 Share Mod_LoadBSPXDecoupledLM between renders 2023-10-07 14:11:28 +03:00
Denis Pauk
9b235a1711 Share Mod_CalcSurfaceExtents between renders 2023-10-07 14:04:17 +03:00
Denis Pauk
3b7170c4bd Share SetSurfaceLighting between renders 2023-10-07 13:36:15 +03:00
Denis Pauk
38cbdaf00a Apply BSPX_LightGridValue in R_LightPoint 2023-10-07 03:08:26 +03:00
Denis Pauk
f81e339efc R_LightPoint: share between renders 2023-10-07 01:41:18 +03:00
Denis Pauk
262a1ee5ef vk: Prepare to share R_LightPoint 2023-10-07 01:21:19 +03:00
Denis Pauk
0311194305 soft: Prepare to share R_LightPoint 2023-10-07 00:22:30 +03:00
Denis Pauk
22095bb832 gl4: Prepare to share R_LightPoint 2023-10-06 23:47:10 +03:00
Denis Pauk
b0835a92e6 gl3: Prepare to share R_LightPoint 2023-10-06 23:36:38 +03:00
Denis Pauk
7fd23f07db gl1: Prepare to share R_LightPoint 2023-10-06 23:15:53 +03:00
Denis Pauk
8f5a40710b R_RecursiveLightPoint: Share part of light logic 2023-10-06 18:38:24 +03:00
Denis Pauk
a381c9dc5d gl1,gl3,gl4,vk: Reuse mpoly_t 2023-10-06 01:27:43 +03:00
Denis Pauk
821490bbbd Prepare for reuse mpoly with mvtx_t/glvk_vtx_t 2023-10-05 22:42:56 +03:00
Denis Pauk
a567201160 gl3,gl4.6: Reuse mvtx_t 2023-10-05 19:41:45 +03:00
Denis Pauk
21ceb16de4 Move BSPX lighting code to shared code 2023-10-05 19:24:15 +03:00
Shpoike
a87c9a0cd8 Initial port of BSPX lights
0eeb410ce0
2023-10-05 01:30:54 +03:00
Denis Pauk
f2393a2e34 Fix load mguhub
Need dynamic allocation and additional checks for array sizes,
looks like overflow in mgu4m3, mgu5m2.
2023-10-04 00:30:26 +03:00
Denis Pauk
c3cd2d5aeb Show load timings 2023-10-03 23:06:54 +03:00
Denis Pauk
13b4d324d0 Rename IBSQ -> QBSP 2023-10-03 01:05:16 +03:00
Denis Pauk
1572b5ff2d gl1,vk: Share msurface_r/mpoly_t definition 2023-10-02 23:17:24 +03:00
Denis Pauk
c916e56d2d Reuse r_showtris in renders 2023-10-02 22:37:35 +03:00
Denis Pauk
67e892f186 Sync R_RecursiveLightPoint implementation between renders 2023-10-02 14:58:20 +03:00
Daniel Svensson
ee757f4100 ref_gl4: LIGHTMAPS: Add support for LMSHIFT.
Could be extended to support the LMSHIFT BSPX blob. Currently mostly a
cleanup to make DECOUPLEDLM changes more readable.
2023-10-02 14:41:52 +03:00
Denis Pauk
583164f7a5 Add listlights command 2023-10-01 18:42:54 +03:00
Denis Pauk
441bb2a3ca vk,soft: Fix license header. 2023-10-01 14:16:02 +03:00
Denis Pauk
d968cd959c Share R_BoundPoly code 2023-10-01 13:48:08 +03:00
Denis Pauk
27f029dcb7 Add .ent files hash checks #4 2023-10-01 00:13:53 +03:00
Denis Pauk
6d7ca26df2 cl_view: clean full screen line 2023-09-30 17:44:36 +03:00
Denis Pauk
ea3667ae9c show count of submodels and radius of model 2023-09-30 16:30:18 +03:00
Denis Pauk
0c578322ec soft: Load IBSQ map format 2023-09-29 00:45:15 +03:00
Denis Pauk
3458354d84 soft: remove R_NewMap 2023-09-28 23:39:04 +03:00
Denis Pauk
4a144ddec9 gl3: sync code structure with gl1 and BSPX load
BSPX just loaded without real usage of light maps
2023-09-28 00:31:43 +03:00
Denis Pauk
787e65fda4 soft: sync code structure with gl1 and BSPX load
BSPX just loaded without real usage of light maps
2023-09-28 00:21:19 +03:00
Denis Pauk
e0f4da0103 gl1,gl3,vk: sync code structure 2023-09-26 00:58:06 +03:00
Denis Pauk
c4a31e42c9 ref_gl3: Load IBSQ map format 2023-09-26 00:35:33 +03:00
Denis Pauk
5ab77f1a69 Enable quake3 like 'set' commands 2023-09-25 00:26:01 +03:00
Denis Pauk
bce1d70186 make input parameters consts in shared.c where possible 2023-09-22 22:47:31 +03:00
Denis Pauk
97967c37c1 DrawAltString const fix 2023-09-22 01:09:07 +03:00
Denis Pauk
ff70128bb9 Make all names in game interface const where possible 2023-09-22 00:58:40 +03:00
Denis Pauk
2274e86481 Make all names in render interface const 2023-09-21 23:40:45 +03:00
Denis Pauk
ddf31c962c Add OpenGL 4.6 to video menu 2023-09-20 01:34:00 +03:00
atsb
637933a23c Add the OpenGL 4.6 renderer for YQ2
https://github.com/yquake2/ref_gl4
2023-09-20 01:23:22 +03:00
Denis Pauk
7c4a06320a Sync gl1 and vk code style 2023-09-19 00:09:59 +03:00
Denis Pauk
6079adae75 Add support with several separate meshes for body parts
FM models has several meshes for different body parts, where
command lsit has section with different length sum of which equal
to total command count.
2023-09-18 23:53:46 +03:00
Denis Pauk
f6319f8bc0 ref_vk: Load IBSQ map format 2023-09-17 16:28:50 +03:00
Denis Pauk
893abc564a Daikatana fix search BSPX header 2023-09-17 16:01:11 +03:00
Denis Pauk
d5515c8525 Daikatana: load bsp and wal formats
https://gist.github.com/DanielGibson/2ceeba3fb6141e839c4aaf141b649762
2023-09-17 16:00:41 +03:00
Denis Pauk
b7f78626f8 Add additioan description of goals. 2023-09-17 15:48:42 +03:00
Daniel Svensson
bbf4a9f189 soft: LIGHTMAPS: Add support for LMSHIFT.
Could be extended to support the LMSHIFT BSPX blob. Currently mostly a
cleanup to make DECOUPLEDLM changes more readable.
2023-09-17 15:19:17 +03:00
Daniel Svensson
d3f0fde1ae gl3: LIGHTMAPS: Add support for LMSHIFT.
Could be extended to support the LMSHIFT BSPX blob. Currently mostly a
cleanup to make DECOUPLEDLM changes more readable.
2023-09-17 15:17:00 +03:00
Denis Pauk
42465a6b03 Add Vulkan render 2023-09-17 14:17:14 +03:00
Denis Pauk
92a0bcf128 fix heretic2 like sprite path 2023-09-17 14:07:01 +03:00
David CARLIER
34830efda1 Mod_LoadFlexModel fix uninit var 2023-09-17 14:04:49 +03:00
Denis Pauk
412ea8406a Add dkm models support (daikatana)
Based on:
 * [TrenchBroom](https://github.com/TrenchBroom/TrenchBroom/blob/master/common/src/IO/DkmParser.cpp)
 * [dkm2md2](http://charles.hollemeersch.net/daikatana-tools/)
2023-09-17 14:01:36 +03:00
Denis Pauk
cfac300e74 Add fm/heretic2 model support
Save additional list of meshes between dmdl_t and list of skins.

https://sourceforge.net/p/quark/code/HEAD/tree/runtime/trunk/plugins/ie_fm_import.py
2023-09-17 13:54:51 +03:00
Denis Pauk
db436ee6e4 Add Quake mdl format support
http://tfc.duke.free.fr/coding/mdl-specs-en.html
2023-09-17 13:48:09 +03:00
Denis Pauk
bd5685d201 Add Heretic 2 mpeg support
2aa2b7aec8
2023-09-17 12:11:41 +03:00
Dominic Szablewski
88079c9c70 Add mpeg decoder
https://github.com/phoboslab/pl_mpeg

License: MIT
2023-09-17 12:04:28 +03:00
Denis Pauk
c898573885 Add support of smacker files
https://sourceforge.net/projects/libsmacker/files/libsmacker-1.2/

libsmacker is released under the Lesser GNU Public License, v2.1.
2023-09-17 11:54:57 +03:00
Denis Pauk
85ebca9979 ref_gl1: Load IBSQ map format 2023-09-16 19:42:40 +03:00
Frank Richter
10e791471e Add 'skyautorotate' worldspawn property as found in rerelease game.
This is necessary to stop the sky in some rerelease maps, eg base1,
from spinning: these maps set a 'skyrotate' value, but explicitly
disable it with the new 'skyautorotate'.
2023-09-16 19:42:40 +03:00
Daniel Svensson
9cb349e6e9 ref_gl1: LIGHTMAPS: Add support for DECOUPLEDLM.
Decouples texture coordinates from lightmap coordinates to allow for
higher resolution lightmaps, and also avoids lightmap misalignment when
shadows span surfaces with differing texture scale.
2023-09-16 19:42:40 +03:00
Daniel Svensson
27331bcd1c ref_gl1: LIGHTMAPS: Add support for LMSHIFT.
Could be extended to support the LMSHIFT BSPX blob. Currently mostly a
cleanup to make DECOUPLEDLM changes more readable.
2023-09-16 19:42:40 +03:00
Denis Pauk
a11b298d5c ref_gl1: Add BSPX load 2023-09-16 19:42:40 +03:00
David CARLIER
437c16c0d1 "constifying" where underlying C calls expect compile time constants. 2023-09-16 18:16:52 +02:00
Yamagi
73c3afd47e
Merge pull request #1060 from devnexen/constify_it
"constifying" where underlying C calls expect compile time constants.
2023-09-16 18:14:17 +02:00
Yamagi
203780b613 Merge remote-tracking branch '0lvin/rerelease' 2023-09-16 17:29:36 +02:00
David CARLIER
3b8053edae "constifying" where underlying C calls expect compile time constants. 2023-09-16 16:20:21 +01:00
Daniel Gibson
3c8f087bb5 Fix use-after-free bugs in htttp download code
CL_RemoveFromQueue(qdlqueue_t *entry) free()s that entry, so the loops
that call q->next after CL_RemoveFromQueue(q) are accessing free'd
memory. Fix that by getting a pointer to the next entry before calling
CL_RemoveFromQueue().

Also did a tiny non-functional change to CL_RemoveFromQueue() to
make it easier to understand.
2023-09-16 16:59:31 +02:00
Yamagi
43e2a67f12 Fix indention problems introduced in the last commits. 2023-09-16 16:33:13 +02:00
Yamagi
49d4f2ce1f Merge remote-tracking branch 'menu/oss' 2023-09-16 16:30:04 +02:00
Denis Pauk
ae7d6c1800 r_retexturing: use rgb with pcx if image has builtin palette 2023-09-16 10:56:50 +03:00
Denis Pauk
3ffe9f522e soft: use same full light as gl* version if none
Use fullbright if not lights provided, same logic used by default
for gl renders and way to show something for ReRelease version
while real support is not implemented yet.
2023-09-16 10:56:50 +03:00
Denis Pauk
3b82261dec Make sound samples const 2023-09-16 10:56:50 +03:00
Denis Pauk
2fc15692d3 Add support of Quake 2 N64 ReRelease 2023-09-16 10:56:50 +03:00
Denis Pauk
318cd69318 Add nolerp filtering by * 2023-09-16 10:56:50 +03:00
Denis Pauk
9f8af6ec54 Generate palette and color map 2023-09-16 10:56:50 +03:00
Denis Pauk
dfff401645 Share 24to8 convert logic 2023-09-16 10:56:50 +03:00
Denis Pauk
43e4951f43 Automatically generate 16to8 bit colors 2023-09-16 10:56:50 +03:00
Denis Pauk
903272ee09 Support Quake2 ReRelease textures 2023-09-16 10:56:50 +03:00
Jaime Moreira
faee2203b8 Added missing include for USHRT_MAX 2023-09-15 11:42:50 -03:00
Yamagi
4afcd900cc
Merge pull request #1049 from protocultor/g_swap_speed_fix
Fix for g_swap_speed behaviour with extreme values
2023-09-14 21:01:42 +02:00
Jaime Moreira
9821c4b0a2 Show correct replacement for gl_lightmap cvar
Typos corrected
2023-08-26 19:18:24 -04:00
Jaime Moreira
c2ab0f61d7 Fixed Zoid Kirsch's name in credits 2023-08-26 19:10:26 -04:00
Jaime Moreira
118b78256f Fixed g_swap_speed behaviour with extreme values
When its value was between 0 and 1, rounded down to 0.
Did the same when bigger than 65535.
Both cases locked up the entire weapon animation.
2023-08-26 19:08:26 -04:00
Johan Mattsson
9c929ab463
Fix potential index out of bounds 2023-08-13 18:04:04 +02:00
David Carlier
efc59a3e3d unix NET_Socket fix socket leak at address assignment failure. 2023-07-29 06:55:22 +01:00
Yamagi
030af432f7
Merge pull request #1033 from BjossiAlfreds/vn2-fix
Fixed VectorNormalize2 not writing 0-length vectors to out
2023-07-16 09:48:54 +02:00
BjossiAlfreds
d3c9529df6 Fixed VectorNormalize2 not writing 0-length vectors to out 2023-07-07 23:59:20 +00:00
Denis Pauk
63d990487a models: ignore sprites/skins bigger than MAX_MD2SKINS 2023-07-02 00:30:21 +03:00
Denis Pauk
5c0883594f cl_cin: Support of RGBA png/jpg image with r_retexturing as cinematic 2023-07-02 00:03:18 +03:00
Denis Pauk
86dd7e6d2d Remove redudant rserr_invalid_fullscreen check 2023-07-01 23:17:17 +03:00
Yamagi
f6361740f5 Fix another spurious warning.
gcc 13.1 thinks that `newsocket` can be used uninitialized, because it
doesn't know that a call to `Com_Error()` is fatal.
2023-07-01 17:52:36 +02:00
Yamagi
cb317f2cd3
Merge pull request #1031 from protocultor/g_swap_speed
Cheat to speed up "weapon change" animations
2023-07-01 16:21:42 +02:00
Yamagi
8855d650c6
Merge pull request #1030 from devnexen/compile_time_checks
adding compile time assertion support whenever possible
2023-07-01 16:10:34 +02:00
Jaime Moreira
a94e9dca81 Snappier "g_swap_speed" behaviour
Player is no longer forced to go through the last frame of activation
or deactivation of a weapon before changing its state.
2023-06-29 11:14:58 -04:00
Jaime Moreira
c5e2d51fd7 Cheat cvar "g_swap_speed" implemented
Allows to skip frames of "putting down weapon" and
"raising weapon" animations, speeding them up.
2023-06-28 15:28:40 -04:00
David Carlier
ce3e9136a8 adding compile time assertion support whenever possible
and convert some runtime which deserve to be evaluated earlier.
2023-06-17 16:37:29 +01:00
Yamagi
0e92c704c9
Merge pull request #1028 from BjossiAlfreds/tdam-dir
T_Damage no longer modifies dir parameter
2023-06-17 17:28:36 +02:00
Yamagi
04abfca2df
Merge pull request #1027 from BjossiAlfreds/makronjmp-aifix
Fix for AI bug introduced by new makron jump code
2023-06-17 16:34:40 +02:00
David CARLIER
1ce09d7ef9 R_SetFrustum micro optimisation. 2023-06-16 13:06:05 +01:00
BjossiAlfreds
9ca5923082 T_Damage no longer modifies dir parameter 2023-06-10 18:19:37 +00:00
BjossiAlfreds
51bbb7da70 Fix for AI bug introduced by new makron jump code 2023-06-07 13:44:11 +00:00
Yamagi
4f04e7857a
Merge pull request #1016 from devnexen/netsocket_desc_leaks
network close descriptors on socket creation failure.
2023-06-05 19:16:23 +02:00
Yamagi
9212ded546
Merge pull request #1011 from devnexen/cl_setenv_overflow_fix
fix potential overflow on env vars settings.
2023-06-05 19:15:56 +02:00
Rykita
cd351a0602 Fixed vid_pauseonfocuslost, final. 2023-05-25 23:59:26 +02:00
apartfromtime
be1e6e1743 Fix pause/un-pause on window focus gained or lost
Fixed pause/un-pause on window focus gained or lost in pull request #1017.
Fixed ogg playback when switching video options, missed in #1004.
Fixed ogg playback when the last menu closed, misplaced in #1004.
2023-05-25 15:33:12 +10:00
Rykita
8cbbfaae9e Pause on Minimized/Focus Lost is now in the options menu 2023-05-24 16:42:36 +02:00
BjossiAlfreds
8d937b0a9c Various fixes to makron jump sequence 2023-05-21 16:43:07 +00:00
David CARLIER
c216eece9e network close descriptors on socket creation failure. 2023-05-21 15:24:28 +01:00
Daniel Gibson
218ac53ce9 GL3: Add hack to make lava glow, fix #1014
Normal warping surfaces (SURF_DRAWTURB) with water etc should use
brightness 0.5*intensity (like they did before), but those with lava
should be brighter, so use 1.0*intensity in the shader.
The reason that intensity needs to be scaled down is that these surfaces
have no lightmaps, so they'd be rendered fullbright otherwise.

I'm using the simple heuristic of texturename contains "lava" to
detect lava textures.
2023-05-20 21:07:16 +02:00
Yamagi
51cdc80525 Fix game with older SDL versions.
The window `flags` must be returned always, otherwise there won't be
usable Window flags and the game doesn't start.
2023-05-20 16:26:02 +02:00
David CARLIER
07553f0980 fix potential overflow on env vars settings.
changing a bit Q_strlcpy flow as it can report wrong bytes copied
if src > buffer size.
2023-05-14 19:16:18 +01:00
Yamagi
5f03705c5d Update stb_image.h to v2.28. 2023-05-14 10:01:04 +02:00
Yamagi
dbc0fa12ec Update glad-gles3 to it's latest version. 2023-05-14 09:57:45 +02:00
Yamagi
83fd0d092e Update glad-gl3 to it's latest version. 2023-05-14 09:55:37 +02:00
Yamagi
a5560ff3a2 Implement high dpi awareness into the client and all renderers.
Over the last years high dpi displays became increasingly popular. We
already implemented very basic high dpi support for Windows several
years ago by setting the "please don't scale us" option. Linux (and
all other unixoid platforms) hadn't a real understandig of high dpi
and everything involved until the advent of Wayland and finally the
*fractional-scale-v1* protocol last autumn.

Since then SDL (even bevore the protocol was finalized) and all three
common Wayland compositors (Gnome, KDE and wlroots) have grown support
for the protocol and are now high dpi aware. In a high dpi aware world
the choice is scale yourself or get scaled by the compositor. The later
option isn't so good for fast paced games like Quake II, it introduces
blur and slugishness. Therefore implement hig dpi awareness through SDL.

This isn't perfect right now:
* SDL is still getting high dpi awareness fixes with every release. High
  dpi awareness in YQ2 is currently limited to at least SDL 2.26 and we
  may rise the required version even more if necessary.
* There are stll bugs in the compositors. For example Gnome 44.1 has a
  tedency to misscalculate the space occupied by the fullscreen window,
  the game ends up wit a white bar on top. sway even misscalculates
  some scaling factors: https://github.com/swaywm/sway/issues/7463
* SDL hasn't got a reliable way to get the real non scales desktop
  resolution.

Because of this:
* High dpi awareness is currently restricted to Wayland. Let's get one
  platform right before we implement it for everything else.
* It's hidden behind `vid_highdpiawareness` and disabled by default.

High dpi awareness is implemented by setting `SDL_WINDOW_ALLOW_HIGHDPI`
on the window. After the window and rendering context are created
`SDL_GL_GetDrawableSize()` or `SDL_GetRendererOutputSize()` are used
to query the actual drawable size and the internal representation is
overwritten with it.

This would scale the fullscreen window over the full screen, no matter
what resolution was selected. Some work arounds are implemented to
(mostly) keep the old behaviour were resoltions lower than the desktop
resolution weren't scaled. There is one inconsistency: While the non
high dpi aware soft renderer always scaled over the full screen, the
high dpi aware variant doesn't. This is a restriction by SDL Renderer.

Setting native fullscreen was broken before when running on high dpi
displays and it's not fixed. This is caused by SDL being unable to
determine the real resolution (or whatever the compositor thinks the
real resolution is). Depending on the compositor or if the client is
high dpi aware the correct resolution must be set by hand **or** auto
setting with `r_mode -2` must be used. Resolution detection was switched
to `SDL_GetCurrentDisplayMode()` because it's somewhat less problematic
than `SDL_GetCDesktopDisplayMode()`.

The renderer API was extended by one function pointer `*GetDrawableSize`
used to communicate the actual drawable size between renderer and
client. The API version was bumped to 6. I'll fix ref_vk before pushing
this change to master.
2023-05-14 09:44:23 +02:00
BjossiAlfreds
f128c44e30 Fixed despawning makron torso 2023-05-09 18:37:15 +00:00
Yamagi
a241fd50e4
Merge pull request #999 from devnexen/gcc13_build_fixes
addressing few gcc 13 analyser warnings.
2023-05-08 21:16:55 +02:00
David Carlier
571f3f6fec addressing few gcc 13 analyser warnings. 2023-05-08 18:07:27 +01:00
Yamagi
5fcf2f8d3f
Merge pull request #1005 from BjossiAlfreds/makrondeath
Fixed ungibbable makron parts
2023-05-08 18:23:46 +02:00
Yamagi
040d17ef79
Merge pull request #1007 from BjossiAlfreds/parasitefoot
Fixed parasites ignoring g_monsterfootsteps
2023-05-08 18:16:30 +02:00
Yamagi
f74f61a76a
Merge pull request #1003 from BjossiAlfreds/intersight
Fixed monsters seeing players during intermissions
2023-05-08 18:08:48 +02:00
Yamagi
ff2206bf73
Merge pull request #997 from BjossiAlfreds/gladrange
Fixed stand-ground gladiators not attacking within a certain range
2023-05-08 18:07:24 +02:00
Yamagi
9816ff7712
Merge pull request #1004 from apartfromtime/ogg-pause-music-when-pause-game
Sound backend and ogg pause features
2023-05-08 18:06:22 +02:00
BjossiAlfreds
3ea9d4e291 Fixed parasites ignoring g_monsterfootsteps 2023-05-07 15:15:28 +00:00
BjossiAlfreds
e720bc819d Fixed ungibbable makron parts 2023-05-03 13:51:48 +00:00
apartfromtime
bc5926be4f Sound backend and ogg pause features
Playback features outlined in issue #715 .

Reintroduce activate\deactivate sound backend when window focus in changed.
Added "windowed_pauseonfocuslost" cvar to allowing user control of pause when the window changes focus.
Added "ogg_pausewithgame" cvar to allow user control of ogg playback whenever the game is paused.
Introduced ogg playback command "mute" as an additional playback option for the console, command buffer and key binds.

If the window focus is changed all sound playback will stop and resume as expected.
Setting "window_pauseonfocuslost" to 1 will force the game to pause when the window focus is lost, "cl_paused" is ignored in multiplayer.
Setting "ogg_pausewithgame" to 1 will force ogg playback to pause whenever the game is paused.
Toggling ogg mute through "ogg mute" sets the volume to 0 while playback resumes.
2023-04-29 13:27:38 +10:00
BjossiAlfreds
413781a334 Fixed monsters seeing players during intermissions 2023-04-25 00:02:32 +00:00
apartfromtime
0960984c91 Revert previous changes in 7d4cfd4acd
Implement @protocultors fix.
2023-04-23 17:52:45 +10:00
apartfromtime
7d4cfd4acd Fix implicit declaration of SDL_GameControllerGetSensorDataRate available since SDL 2.0.16 not 2.0.14 2023-04-23 14:31:53 +10:00
BjossiAlfreds
2582a23103 Fixed stand-ground gladiators not attacking within a certain range 2023-04-22 18:46:45 +00:00
Yamagi
22617d8812 Replace two more wcscat_s() overlooked in last commit. 2023-04-22 17:29:22 +02:00
Yamagi
df845e0f67 Avoid the use of wcscat_s() since it's unavailable under Win XP.
Code around it by using `wcsncpy()` and `wcscat()` combined with a
manual length check. This should be enough to make YQ2 working on Win
XP again.  Please note, that we don't support any Windows older than
10. However we still try to avoid breaking them.

Based on an idea by @ carlo-bramini, closes #994.
2023-04-22 16:44:26 +02:00