Commit graph

1737 commits

Author SHA1 Message Date
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
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
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
David CARLIER
1ce09d7ef9 R_SetFrustum micro optimisation. 2023-06-16 13:06:05 +01: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
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
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
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
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
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
Yamagi
f67b65c00a
Merge pull request #993 from devnexen/clang16_attr_fnptr
fix clang 16 build as C11 _NoReturn/noreturn attributes conflict.
2023-04-16 11:24:16 +02:00
Yamagi
cbe3ef4c76 Fix several whitespace errors introduced in the last merge. 2023-04-16 11:20:52 +02:00
Yamagi
51f3810fb7
Merge pull request #986 from apartfromtime/playback-features
Ogg Playback Features
2023-04-16 11:18:29 +02:00
Yamagi
a04809a66e Ensure that new empty console line are really empty.
This fixes a corner case: When the client is in state `ca_disconnected`
and the user presses repeatedly return, there is a chance that a older
line is erroneously printed again. This is caused by spinning through
the console history buffer, when an old line is the current line a the
frame were the console refreshs it's printed. Work around that by
clearing every line as soon as it becomes the current line.

Closes #987.
2023-04-16 10:26:07 +02:00
David CARLIER
5b895615a4 fix clang 16 build as C11 _NoReturn/noreturn attributes conflict.
And remove a handful of unused vars.
2023-04-16 08:19:33 +01:00
Yamagi
11bea2a68b
Merge pull request #990 from protocultor/old_sdl_gyro_switch
Gyro aiming for Switch controllers with SDL < 2.0.14
2023-04-15 18:23:28 +02:00
Jaime Moreira
9a18b39114 Simplified definition of NATIVE_SDL_GYRO
It is being used as a "boolean" anyway; the code only checks its
existence.
2023-04-14 18:16:16 -04:00
Denis Pauk
538aadb9dc Fix sound characteristics calculations
Ogg file has incorrectly calculated size and samples as
result calculation of volume and timings have used
incorrect test samples for sterio sound.

Checked with compare ogg and wav samples from 25th
Anniversary mod:
```
ffmpeg -i 25acu/sound/world/goreshit.wav 25acu/sound/world/goreshit-ogg.wav
```

Soundlist:
```
]/soundlist
 (16b)  1404340(2 ch) world/goreshit.wav -11.7 dB 351.1s:15.0..0.3..1.1..2.0
 (16b)  1404340(2 ch) world/goreshit-ogg.wav -11.5 dB 351.1s:15.0..18.4..1.4..2.0
```

Fixes:
* https://github.com/glhrmfrts/q25_game/issues/8
* https://github.com/yquake2/yquake2/issues/991
2023-04-14 18:22:12 +03:00
Jaime Moreira
61df6a74d5 Gyro aiming for Switch controllers on SDL < 2.0.14
dkms-hid-nintendo can expose the IMU sensors of a Switch controller
as a "second joystick", which makes possible to use gyro aiming on a
system without SDL 2.0.14 available (the minimum required to read
controller sensors like gyro and accelerometer).

This commit makes both "sensor" and "joystick reading" to coexist.
"Sensor" is still the preferred method when available.
2023-03-28 23:06:34 -03:00
apartfromtime
f96deee197 Playback Features
Playback features outlined in issue #729.

Added shuffle playback parameters:

default - Ogg track currently active repeats. This is the quake2 default behaviour.
play once - Ogg track currently active plays once then stops.
sequential - Ogg tracks play in numerical order, from the currently playing track and like default repeats.
random - Ogg tracks play randomly, but never the same track twice.

Ogg tracks can be played from a full-screen console and tracks played will adhere to the shuffle parameter.

Loading a game map the map cd-track takes precedence as the first played track then subsequent playback of tracks will adhere to the shuffle parameter.

Any currently playing track can be overridden from the console with "ogg play <track>" command and subsequent playback of tracks will adhere to the shuffle parameter.

If a sound restart occurs the ogg backend will attempt to save and recover the currently playing track, though some data in the audio queue may be lost in the process.
2023-03-26 14:43:28 +11:00
Daniel Gibson
c2d80c64ee Fix crash in DDays "wake" map, #978
the HunkAlloc size calculated in calTexinfoAndFacesSize() was too
small because that map has a *massive* water poly.
Unfortunately it's not feasible to calculate the correct size
(it depends on the size of the poly, for which I'd need the vertex
coordinates, but to get them I'd have to load them first, which requires
the allocation...), but allocating 5MB extra (instead of 1) made it work
2023-03-25 19:18:35 +01:00
David CARLIER
038848b246 console fix warning build. 2023-03-17 17:17:32 +00:00
David CARLIER
5adf5175c4 CURL client fix on error with CURLMcode. 2023-03-11 15:02:59 +00:00
Denis Pauk
6c9c81e2f7 openal: Fix reverb slot configuration 2023-02-05 16:19:38 +02:00
David Carlier
2e51a9f72f silencing static analysis warnings. 2023-01-31 06:47:04 +00:00
Denis Pauk
16395a15d9 Fix m32 load code 2023-01-21 18:31:18 +02:00
Denis Pauk
0cd2eed28b Share R_CullBox and R_SetFrustum 2023-01-21 18:31:16 +02:00
Denis Pauk
32ab1e1815 Share R_MarkLights 2023-01-21 18:24:55 +02:00
Denis Pauk
d326b1be51 Share R_AreaVisible 2023-01-21 18:24:55 +02:00
Denis Pauk
c17210b34a Share R_TextureAnimation 2023-01-21 18:24:55 +02:00
Denis Pauk
42bfb2014c Share Mod_PointInLeaf 2023-01-21 18:24:55 +02:00
Denis Pauk
442fe10f27 Share Mod_Load* functions 2023-01-21 18:24:55 +02:00
Denis Pauk
4463e1fcd7 Share mnode_t and mleaf_t struct between renders. 2023-01-21 18:24:55 +02:00
Yamagi
6566a2ae7d Handle case that ResizeSTB() failed.
This unlikely, however the compiler printed a warning that `image` may
be used uninitialized.
2023-01-21 16:43:27 +01:00
Yamagi
e17d4f5dc0 Solve warning regarding deprecated curl macros.
These are deprecated since curl 7.31 and 7.50. Even Debian Stretch
(oldoldstable) ships with 7.52.
2023-01-21 16:31:02 +01:00
Yamagi
548b7ff37f Implement gl_polyblend for GL3.
Closes #965.
2023-01-21 16:24:02 +01:00
Yamagi
c5c2af0320 Rename gl1_polyblend to gl_polyblend.
An upcoming commit will implement it for GL3.
2023-01-21 16:19:18 +01:00
David Carlier
f394209c75 introduces a new cl_unpaused_scvis cvar to unpause the cli. 2023-01-08 10:14:09 +00:00
Yamagi
6c18d819d3
Merge pull request #947 from devnexen/sound_pause_option
Introduces new cvar cl_audiopaused to control if the audio loop
2023-01-08 10:45:55 +01:00
David Carlier
7616880b96 Introduces new cvar cl_audiopaused to control if the audio loop
ought to go on or not when the game pauses.
2023-01-07 20:16:24 +00:00
Denis Pauk
633c50177a Haptic: Fix comments 2023-01-07 21:30:21 +02:00
Denis Pauk
4e36b66654 Add joy_haptic_distance cvar.
Haptic maximum effect distance value, By default this cvar is `100.0`.
Any positive value is valid. E.g. effect of shot near barrel to barrel
has 58 points.
2023-01-07 21:30:21 +02:00
Denis Pauk
e1aed62201 Haptic code cleanup 2023-01-07 21:30:21 +02:00
Denis Pauk
1c4dae7c87 Haptic: Add sound filtering by string
filters are separated by spaces with '*' support,
and '!' for apply opposite decision.
2023-01-07 21:30:21 +02:00
Denis Pauk
37344b5330 Haptic: skip clean of slots without configured haptic 2023-01-07 21:30:21 +02:00
Denis Pauk
db83143b47 haptic: reuse old slots and left some slots for rumble on error 2023-01-07 21:30:21 +02:00
Denis Pauk
da65a6df12 haptic: Fix typos 2023-01-07 21:30:21 +02:00
Denis Pauk
66523aa98e Restore haptic feedback functionality.
Rumble feedback will be default.
Checked in both modes with:
* LibSDL2: 2.24.2+dfsg-1 (debian testing)
* Microntek USB Joystick (DragonRise hid-dr.ko)
2023-01-07 21:30:21 +02:00
Yamagi
81647f79ec Remove the unused msg cvar and server side infrastructure.
In Quake I this coould be used to filter messages by priority. id
Software never implemented it for Quake II, it's just a left-over.
Remove it.

The `msg` cvar was exploited in attacks against the client. A malicious
server send a `msg` cvar as stufftext -> it gets saved into the config
-> since it's retrivable over the network through the userinfo stuff
this can be used to track users, etc.
2023-01-07 19:15:01 +01:00
Denis Pauk
9fb4480948 Share SURF_* values between renders
Reuse DRAWSKY value in soft render instead unused
DRAWSKYBOX and SURF_FLOW.

Move mipadjust calculation to usage place in soft render.
2022-12-11 12:11:47 +02:00
Denis Pauk
c2dc8debb6 Share models structs in ref_shared.h
Fix calculation in:
```
hunkSize += calcLumpHunkSize(&header->lumps[LUMP_MODELS], sizeof(dmodel_t), sizeof(model_t));
```
`Mod_LoadSubmodels` uses whole model_t as submodel type.
2022-12-11 12:11:47 +02:00
Denis Pauk
322424ef33 Image: show missed images with r_validation 2022-12-11 12:11:47 +02:00
Denis Pauk
49a1478d44 Image: Check skin image before use 2022-12-11 12:11:46 +02:00
Denis Pauk
a22bbc8719 Image: Share Draw_FindPic 2022-12-11 12:11:46 +02:00
Denis Pauk
395641e1dc Image: Share GetTexImage 2022-12-11 12:11:46 +02:00
Denis Pauk
f6f6639a89 Image: Share loadSky textures
Add support of `r_palettedtextures` to all renders.
2022-12-11 12:11:46 +02:00
Denis Pauk
18bc788335 Image: Share LoadImage 2022-12-11 12:11:46 +02:00
Denis Pauk
43c690eab2 Image: Share Hicolor 2022-12-11 12:11:46 +02:00
Denis Pauk
5e2ecede93 Image: Add M32 support functions
https://github.com/TTimo/GtkRadiant/blob/master/plugins/imagem8/m32.h
2022-12-11 12:11:46 +02:00
Denis Pauk
f77e6940bd Image: Share M8 2022-12-11 12:11:46 +02:00
Denis Pauk
11f5b9e475 Image: Share code for load Wal 2022-12-11 12:11:46 +02:00
Denis Pauk
ec83adcba5 Image: Share code for add file extension 2022-12-11 12:11:46 +02:00
Denis Pauk
768139ad6a Image: Share Draw_GetPalette between renders 2022-12-11 12:11:46 +02:00
Yamagi
c764f3f142
Merge pull request #943 from devnexen/vulkan_menu_upd2
updating vulkan renderer sub menu to be a bit more on part with the r…
2022-12-03 16:48:39 +01:00
Yamagi
3617fa56be
Merge pull request #941 from protocultor/controller_refactor
Game Controller code refactor
2022-12-03 16:44:28 +01:00
David Carlier
91368f6f1b updating vulkan renderer sub menu to be a bit more on part with the rest. 2022-12-01 12:35:26 +00:00
Jaime Moreira
ad56a8bae5 Controller rumble support queried in SDL >= 2.0.9 2022-12-01 09:10:44 -03:00
Jaime Moreira
4d040f0878 Builds with SDL2 <= 2.0.9
Unneeded variable deleted
Regretted printing style choice after seeing logs in Windows Notepad
2022-11-24 21:05:34 -03:00
Jaime Moreira
618374f351 Game Controller code refactor
Patchwork from df399576 no longer needed, deleted
Joysticks open with error checking
Slight optimization for gyro aiming
Better console messages in game controller init
2022-11-23 01:12:38 -03:00
David Carlier
d93916d6ba also pause the game if for example we change desktop's workspace 2022-11-21 22:42:35 +00:00
Yamagi
15adee3b06
Merge pull request #936 from devnexen/mem_issues_fix_prop
OGG_LoadAsWav, release as long it had been allocated.
2022-11-20 17:15:33 +01:00
Yamagi
282f3a8e9c
Merge pull request #934 from devnexen/vk_menu_upd
adding new menu entry for the vulkan renderer
2022-11-20 17:08:29 +01:00
Yamagi
6f07cb2be0
Merge pull request #933 from protocultor/gamepad_menu
More options for Gamepad menu
2022-11-20 16:29:57 +01:00
Jaime Moreira
f8e86e9056 Removed unneeded info in controller init
Since now there's a menu to show and modify this info, we don't need it
printed on the console.
Also, controller can exit credits option now.
2022-11-19 23:14:43 -03:00
Yamagi
a1e0ce0732 Fix audio file length misscalculated due to overflow.
`s_info->samples' is very big, even for short wave files. Multiply it by
1000 has a very high chance of flowing over and it is a wonder that so
 far no one noticed it. Fix the overflow by working on 64 bit integers.

 Closes #931.
2022-11-19 16:54:52 +01:00
David Carlier
4568df7fb1 OGG_LoadAsWav, release as long it had been allocated. 2022-11-18 17:43:29 +00:00
Jaime Moreira
20a1db6cac Invert joystick's pitch in options menu 2022-11-10 16:46:17 -03:00
David Carlier
d9d7eef4ee adding new menu entry for the vulkan renderer 2022-11-09 20:53:26 +00:00
Jaime Moreira
85b9841785 Reordered elements in 'sticks config' menu
Repeated definitions put in a couple of loops
2022-11-09 09:00:32 -03:00
Jaime Moreira
672aef07e6 Hide the gamepad menu if one is not connected
SDL Controller opens with error checking
Deleted a duplicate structure on menu
Renamed the "gyro enabled" boolean
2022-11-08 12:38:24 -03:00
Jaime Moreira
b11937980b Gamepad Sticks submenu
Sticks layout and expo options moved there
Includes deadzone sliders
2022-11-08 08:13:13 -03:00
Yamagi
57db0df752 Force the GL1 overbrightbits slider to full integers.
The cvar is accepting full integers only.
2022-11-06 18:08:49 +01:00
Yamagi
dfd154b533 Merge remote-tracking branch 'devnexen/gl1_videomenuupd' 2022-11-06 18:05:25 +01:00
David Carlier
575ea06b9d gl1 and gl3 having their own menu data 2022-11-06 16:18:53 +00:00
Jaime Moreira
6998509a85 Fixed annoying rumble effect
A cool effect used in 'mine2' map ("train2"), ruined 'train' map; fixed
Player pain readjusted by type, resulting intensity is now almost equal for all
 instead of the "higher health" ones being bigger, which didn't make sense
2022-11-04 11:53:10 -03:00
Jaime Moreira
7b5f80cfc4 Rumble effects readjusted
Player pain slightly downplayed
Ambient effects can be felt from further distance
2022-11-03 15:39:00 -03:00
Jaime Moreira
1ec0a28369 Disconnecting controller hides haptic slider
CenterPrint messages must be 40 characters or lower
2022-10-24 23:46:39 -03:00
Jaime Moreira
303a627d10 Rumble workaround for SDL audio backend
Cache length is different from OpenAL, it must be greatly reduced for
a proper length to be used as the duration of the rumble effect.
2022-10-23 12:06:55 -03:00
Jaime Moreira
5a22720735 Controller Rumble / force feedback
Replaces classic "haptic" implementation, no longer available for
game controllers as of SDL 2.0.14.
2022-10-23 12:05:06 -03:00
Jaime Moreira
5c560039d8 Pause when controller is disconnected
Controller battery warnings added
2022-10-23 11:48:07 -03:00
Yamagi
1a450ef23d Add some more alignement to the video menu.
It looks better this way and is more in line with the other menus.
2022-10-23 14:56:04 +02:00
Yamagi
eab0f90289
Merge pull request #915 from devnexen/renderer_new_options
gl3/gl3es renderer display intensity/colorlight sub options.
2022-10-23 14:54:44 +02:00
Yamagi
871292934d Work around wrong palette after skiping cinematic whith developer 1.
Quake II has two palettes. One static palette used for the world and one
dynamic palette used by cinematics. Switching from the cinematic back to
the world palette is handled by putting up the loading plaque. Since a
cinematic always ends with loading somehting else this generally works.

Unfortunatly setting `developer 1` skips the loading plaque. The palette
never gets reset and the world looks like a bad LSD trip. ;) A correct
fix is complicated, because the loading plaque logic is messed up and
working by luck. Reworking the logic has a high propability breaking
corner cased exploited by mods.

Therefor take the easy route and uncoditionally switch to the world
palette when bringing up the loading plaque with `developer 1`.

Closes #925.
2022-10-23 14:50:47 +02:00
David Carlier
1a8f05b3ca gl3/gl3es renderer display intensity/colorlight sub options. 2022-10-22 21:19:28 +01:00
Daniel Gibson
690e46512e Restore stair step smoothing code for step sizes != 16
commit 93e9633382 "Port step smoothing code from r1q2." ported
r1q2 stair step smoothing for ranges that are equivalent to 8, 12 and 16
units/step.
Later in commit 7f996cc "Don't smooth half height steps" we removed
step sizes 8 and 12, because it appeared to make an elevator in hangar2
(over the water, after jump'n'run sequency) stutter.
However, in reality what made them stutter was the broken comparison
for velocity with an illegal cast, that we later fixed in
e30f82494 "Don't cast the array itself but it's content."

So now restore the smoothing for step sizes 8 and 12, which hopefully
fixes bug #923, and definitely does *not* break the elevater in hangar2.
2022-10-22 17:09:49 +02:00
Denis Pauk
b628fa9133 Share Mod_ReLoadSkins for reload images on model load 2022-10-17 22:43:40 +03:00
Denis Pauk
b2e8fbb086 Use quake style for types naming 2022-10-17 22:43:40 +03:00
Denis Pauk
f6e4f17c0a Mod_Load*: use pointer to image find 2022-10-17 22:43:40 +03:00
Denis Pauk
1dc617dee6 Mod_LoadMD2: Set max/min 2022-10-17 22:43:39 +03:00
Denis Pauk
e01e5273f8 {gl1,gl3,soft}_model.c fix const parameters 2022-10-17 22:43:39 +03:00
Denis Pauk
ae13c7e034 Share MD2/SP2 files 2022-10-17 22:43:39 +03:00
Yamagi
caab3864c6
Merge pull request #921 from BjossiAlfreds/ogg
Fixed ignoretrack0 and ogg menu option bugs
2022-10-16 18:57:35 +02:00
Jaime Moreira
f0d985dfb9 Deleted unneeded string terminators
Redundant after the usage of Q_strlcpy
2022-10-15 10:41:38 -03:00
Jaime Moreira
cc45e20bac Replaced strncpy with Q_strlcpy 2022-10-12 14:53:33 -03:00
BjossiAlfreds
e1efbecc82 Fixed ignoretrack0 and ogg menu option bugs 2022-10-12 13:42:48 +00:00
Jaime Moreira
7ca0ba4c11 Allows controller to select skin in menu 2022-10-11 17:13:26 -03:00
Jaime Moreira
b96734b9ee Skin names can have a length of 32 total
Fixes crash when entering "multiplayer" -> "player setup" menu with a skin name len > 16
Fixes "playermodels" cmd, which showed "(null)" as a final skin for every model
2022-10-11 16:58:44 -03:00
Jaime Moreira
5c7bf732df Player skins in menu sorted alphabetically
Mods in menu are now ordered: baseq2, xatrix, rogue, ctf, the rest
2022-10-08 17:21:50 -03:00
Yamagi
746f5ad21e
Merge pull request #913 from devnexen/sdl_windowmin_pause
pause the game when window is minimized.
2022-10-08 19:44:24 +02:00
David Carlier
9298c3abc8 pause the game when window is minimized.
closes #911
2022-10-08 18:03:03 +01:00
Yamagi
3222270df6
Merge pull request #900 from protocultor/delete_save
Quicksaves can be deleted from menu
2022-10-08 15:16:06 +02:00
Yamagi
294c4d1175
Merge pull request #896 from protocultor/gyro_invert
Options to invert gyro axes
2022-10-08 15:08:14 +02:00
David Carlier
f9d9577e9c fix some unitialized vars and clarify signedness on a handful of bitshift ops. 2022-10-08 15:07:02 +02:00
Jaime Moreira
654c145e29 Quicksaves can be deleted from menu
Also, avoids asking for deletion in "<empty>" savegames
2022-09-23 17:57:01 -03:00
Jaime Moreira
9de55c603d Classic cvar 'in_initjoy' resurrected
Added myself to credits
2022-09-19 11:36:23 -03:00
Jaime Moreira
da31490684 "Invert gyro" spincontrols 2022-09-19 11:27:47 -03:00
Jaime Moreira
54eb9e441d Sliders can ignore cvar value's sign, if needed
Gyro sensitivity sliders need this, since their values can be negative
to invert pitch and yaw.
2022-09-19 11:24:06 -03:00
Denis Pauk
61f4540617 Fix documentation for model preview.
All default players models have 84-94 frames for salute.
So value will be same for `cyborg`/`female`/`male`.
2022-09-18 12:39:50 +03:00
Denis Pauk
3b583a7143 Bumb game version value
New code has exported monster footsteps sounds function.

Fixes typos.
2022-09-18 12:39:50 +03:00
Denis Pauk
4946400260 sound: reverb logic cleanup 2022-09-18 12:39:50 +03:00
Denis Pauk
93c6c76b0e sound: cleanup reverb code 2022-09-18 12:39:50 +03:00
Denis Pauk
983f1db185 audio: Update autopick reverb magic 2022-09-18 12:39:50 +03:00
Denis Pauk
eb640a0033 sound: Little bit simplify reverb 2022-09-18 12:39:50 +03:00
SkacikPL
f0d6db5d4a Improved reverb behavior and presets
Adjusted presets and their ranges. Occluded sounds no longer have reverb.

Cherrypick of 66927bff72
2022-09-18 12:39:50 +03:00
SkacikPL
93812df488 Added reverb sound effect
Enabled by default, can be disabled via s_reverb 0. Also by default
picks preset automatically out of 7 presets based on surrounding
size, this function can be disabled via s_reverb_preset_autopick 0.
Presets can be set manually via s_reverb_preset (0-113).

Cherrypick of ac7be51e94
2022-09-18 12:39:50 +03:00
SkacikPL
66f1bc9a33 Add simple sound occusion based on YQ2 AL EFX code
Can be disabled via s_occlusion 0, strength is modified
via s_occlusion_strength (higher values are actually less occlusion).

Cherrypick of b557494e14
2022-09-18 12:39:50 +03:00
Denis Pauk
90b14fca24 game: make mframe static and export footstep functions 2022-09-18 12:39:50 +03:00
Yamagi
5a3163a7e4 Merge remote-tracking branch 'ui/ui' 2022-09-18 09:43:49 +02:00
Ted Thompson
7e7cda4487 Added brackets around mod names in menu 2022-09-17 17:30:17 +02:00
Yamagi
1053b5dfb1
Merge pull request #871 from 0lvin/new_commands
Add new cheats spawn commands
2022-09-17 17:17:02 +02:00
Yamagi
e705b48a8e
Merge pull request #883 from protocultor/thumbsticks_fs
Improved controller thumbsticks precision + Flick Stick
2022-09-17 16:13:57 +02:00
apartfromtime
f63b5914f6 Include guard pointers
Spincontrol checks for null itemnames, which could cause undefined behaviour (menu disappears or crashes) in some instances.
2022-09-10 09:05:36 +10:00
Denis Pauk
5cddd2110c client: add multiplayer model preview animation 2022-09-04 23:40:55 +03:00
Denis Pauk
cf110b5ea0 game: Add spawn on start point
It could be used for spawn weapon or opponnent for coop at spawn point.
2022-09-04 23:40:55 +03:00
Denis Pauk
2a8a2f390a game: add spawn entity by coordinates 2022-09-04 23:40:55 +03:00