Merge pull request #1049 from protocultor/g_swap_speed_fix

Fix for g_swap_speed behaviour with extreme values
This commit is contained in:
Yamagi 2023-09-14 21:01:42 +02:00 committed by GitHub
commit 4afcd900cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 41 additions and 39 deletions

View file

@ -19,7 +19,7 @@ Quake II 8.10 to 8.20:
0lvin)
- Ported reverb effects from SkacikPLs Q2RTX fork. (by 0lvin)
- Fix several coop related bugs with the powercubes. (by BjossiAlfreds)
- A way better fix for dead bodys obstructing elevators or falling
- A way better fix for dead bodies obstructing elevators or falling
through the worldmodel. (by BjossiAlfreds)
- Fix items already in water playing a splash sound at level start. (by
BjossiAlfreds)
@ -35,7 +35,7 @@ Quake II 8.01 to 8.10:
- Add 'ref_gles3', an OpenGL ES 3.0 renderer lib. This is an variant
of the OpenGL 3.2 renderer, using OpenGL ES instead of desktop OpenGL.
It greatly enhances support for embedded GPUs like the RaspberryPI 4.
- The Software renderer now supports colored lightning. It can be
- The Software renderer now supports colored lighting. It can be
enabled through `sw_colorlight`. (by 0lvin)
- Another round of timing fixes. Implement `cl_maxfps -1` (the new
default, existing configs are not altered) to automatically select
@ -43,7 +43,7 @@ Quake II 8.01 to 8.10:
framerate. This solves some subtile problems with stuttering entities.
- Greatly improved support for joysticks and controllers. Devices can
now be hotplugged at runtime, binding should be portable between
differend controllers and there's a new menu for controller bindings.
different controllers and there's a new menu for controller bindings.
(by Jaime Moreira)
- Add the `r_2D_unfiltered` and `r_videos_unfiltered` cvars. When
enabled 2D elements like the HUD and videos are not filtered, they
@ -76,9 +76,9 @@ Quake II 8.00 to 8.01:
- Optimise command line parser and fix several subtle bugs. (by
BjossiAlfreds)
- Add `r_2D_unfiltered`, when set to `1` 2D elements aren't filtered.
- Fix soldiers never chowing their pain skin as long as they're alive.
- Fix soldiers never showing their pain skin as long as they're alive.
- Fix relative paths in ZIP files not being found.
- Add `gamemode` command for changing between singleplayer, deathmach
- Add `gamemode` command for changing between singleplayer, deathmatch
and coop. (by BjossiAlfreds)
- Show a download progress bar when `cl_http_show_dw_progress` is set to
`1`. (by David Carlier)
@ -212,8 +212,8 @@ Quake II 7.30 to 7.40:
And the display refresh rate detection no longer cripple working GPU
drivers in an efford to work around bugs in older version of AMDs.
- A lot of fixes to the internal memory management. The game is now
much more memory efficient, this allows playing of extremly big maps
without crashes. This is largly based upon work done by Denis Pauk.
much more memory efficient, this allows playing of extremely big maps
without crashes. This is largely based upon work done by Denis Pauk.
- New and much more detailed documentation.
- Enhancements to the software renderer. Retexturing packs are now
supported, general cleanup and bugfixes. (by Denis Pauk)
@ -244,7 +244,7 @@ Quake II 7.10 to 7.20:
The configuration file will be converted at the first start, when an
old cvar name is used a message is printed.
- Make the client unicode compatible. Yamagi Quake II can now be
installed into pathes with unicode characters in it. On Windows the
installed into paths with unicode characters in it. On Windows the
user name of the current account may contain unicode characters.
As a side effect the game can run on ReFS volumes. While '+set
basedir' is still supported, the unicode compatible '-datadir'
@ -292,7 +292,7 @@ Quake II 7.01 to 7.02:
vsync or the gl_maxfps cvar) with an accuracy of about +/- 1% as long
as the hardware is fast enough. The framecounter was reimplemented
to be much more precise.
- Fix misspredictions if an original client running on Win32 connects
- Fix mispredictions if an original client running on Win32 connects
to a Yamagi Quake II server running on Linux/i386.
Quake II 7.00 to 7.01:
@ -331,7 +331,7 @@ Quake II 5.34 to 6.00:
Quake II 5.33 to 5.34:
- Add support for stereo 3D (by Valery Guskov)
- Make gibt solid so they move with conveyor belts.
- Make gibs solid so they move with conveyor belts.
- Disable gl_ext_multitexturing by default.
- Switch from an arch whitelist to an "all archs are supported"
approach.
@ -345,7 +345,7 @@ Quake II 5.32 to 5.33:
- Better support for keyboards with AZERTY layout
Quake II 5.31 to 5.32:
- Fix problems with never openal-soft versions.
- Fix problems with newer openal-soft versions.
- Fix overbright bits not applied to regular meshes. (by David Reid)
- Several improvements to GUI / HUD scaling. (by David Reid)
- Don't stop generating gibs after map change.
@ -391,7 +391,7 @@ Quake II 5.21 to 5.22:
- Add support for MSAA through the gl_msaa_samples cvar.
Quake II 5.20 to 5.21:
- Fix a bug regaring mouse key handling (reported by phenixia2003)
- Fix a bug regarding mouse key handling (reported by phenixia2003)
- Correct MS Windows builds. Add official support for Win64. This
still needs some testing.
- Allow to shutdown the client by pressing ctrl-c or sending SIGTERM.
@ -539,9 +539,9 @@ Quake II 2.10RC to 2.10RC2:
- Slightly better game performance (~10 FPS)
Quake II 2.00 to 2.10RC:
- Automagical releases the mouse when the console is opened
- Automagically releases the mouse when the console is opened
- Increased the maximal amount of file descriptores from 64 to 256.
This should fix some very rare crashes with 'The Reconing' and
This should fix some very rare crashes with 'The Reckoning' and
possible similar problems with mods. (reported by E. Müller)
- Support for custom resolutions (by caedes and Yamagi)

View file

@ -35,7 +35,7 @@ if (MSVC)
# ignore some compiler warnings
add_compile_options(/wd4244 /wd4305) # possible loss of data/truncation (double to float etc; ignore)
add_compile_options(/wd4018) # signed/unsigned missmatch
add_compile_options(/wd4018) # signed/unsigned mismatch
add_compile_options(/wd4996) # 'function': was declared deprecated (like all that secure CRT stuff)
# don't show me warnings for system headers, why the fuck isn't this default
add_compile_options(/experimental:external /external:W0)

View file

@ -1072,7 +1072,7 @@ endif
# ----------
# Rewrite pathes to our object directory.
# Rewrite paths to our object directory.
CLIENT_OBJS = $(patsubst %,build/client/%,$(CLIENT_OBJS_))
REFGL1_OBJS = $(patsubst %,build/ref_gl1/%,$(REFGL1_OBJS_))
REFGL3_OBJS = $(patsubst %,build/ref_gl3/%,$(REFGL3_OBJS_))

View file

@ -174,7 +174,7 @@ support colored lighting.
General cvars:
* `cl_lights`: Set to `0` to disable the dynamic lightning.
* `cl_lights`: Set to `0` to disable the dynamic lighting.
Both OpenGL renderers:
* `gl_texturemode`: Set to `GL_NEAREST` to disable the texture

View file

@ -212,7 +212,7 @@ Set `0` by default.
* **g_fix_triggered**: This cvar, when set to `1`, forces monsters to
spawn in normally if they are set to a triggered spawn but do not
have a targetname. There are a few cases of this in GroundZero and
have a targetname. There are a few cases of this in Ground Zero and
The Reckoning. This cvar is disabled by default to maintain the
original gameplay experience.
@ -328,10 +328,10 @@ Set `0` by default.
custom maps and is problematic with other custom maps.
* **r_fixsurfsky**: Some maps misuse sky surfaces for interior
lightning. The original renderer had a bug that made such surfaces
mess up the lightning of entities near them. If set to `0` (the
lighting. The original renderer had a bug that made such surfaces
mess up the lighting of entities near them. If set to `0` (the
default) the bug is there and maps look like their developers
intended. If set to `1` the bug is fixed and the lightning correct.
intended. If set to `1` the bug is fixed and the lighting correct.
* **r_vsync**: Enables the vsync: frames are synchronized with
display refresh rate, should (but doesn't always) prevent tearing.

View file

@ -21,7 +21,7 @@
*
* This is a signal handler for printing some hints to debug problem in
* the case of a crash. On Linux a backtrace is printed. Additionally
* a special handler for SIGINT and SIGTERM ist supplied.
* a special handler for SIGINT and SIGTERM is supplied.
*
* =======================================================================
*/

View file

@ -328,7 +328,7 @@ static void CL_StartHTTPDownload (dlqueue_t *entry, dlhandle_t *dl)
static void CL_CheckAndQueueDownload(char *path)
{
// NOTE: The original r1q2 download code in r1q2 allowed
// only // pathes made of plain ASCII chars. YQ2 is more
// only // paths made of plain ASCII chars. YQ2 is more
// or less UTF-8 clean, so we're allowing all characters.
// Malicious filelists may have very long lines.
@ -407,7 +407,7 @@ static void CL_CheckAndQueueDownload(char *path)
length--;
}
// Make sure that there're no evil pathes in the filelist. Most
// Make sure that there're no evil paths in the filelist. Most
// of these should be pretty okay with YQ2 since we've got a much
// better filesystem as other clients but let's stay consistent.
//

View file

@ -2569,7 +2569,7 @@ static const char *idcredits[] = {
"+ADDITIONAL SUPPORT",
"",
"+LINUX PORT AND CTF",
"Dave \"Zoid\" Kirsch",
"Zoid Kirsch",
"",
"+CINEMATIC SEQUENCES",
"Ending Cinematic by Blur Studio - ",
@ -2717,7 +2717,7 @@ static const char *xatcredits[] =
"Brandon James",
"Todd Hollenshead",
"Barrett (Bear) Alexander",
"Dave \"Zoid\" Kirsch",
"Zoid Kirsch",
"Donna Jackson",
"",
"",
@ -2843,7 +2843,7 @@ static const char *roguecredits[] =
"Barrett (Bear) Alexander",
"Katherine Anna Kang",
"Donna Jackson",
"Dave \"Zoid\" Kirsch",
"Zoid Kirsch",
"",
"",
"",
@ -2859,7 +2859,7 @@ static const char *roguecredits[] =
"+AND THE GAME TESTERS",
"",
"The Ranger Clan",
"Dave \"Zoid\" Kirsch",
"Zoid Kirsch",
"Nihilistic Software",
"Robert Duffy",
"",

View file

@ -127,7 +127,7 @@ int RI_PrepareForWindow(void)
}
/*
* Enables or disabes the vsync.
* Enables or disables the vsync.
*/
void RI_SetVsync(void)
{

View file

@ -438,7 +438,7 @@ R_RenderBrushPoly(entity_t *currententity, msurface_t *fa)
gl1_overbrightbits the result is different:
0: Old behaviour.
1: No overbright bits on the global scene but correct lightning on
1: No overbright bits on the global scene but correct lighting on
warping surfaces.
2: Overbright bits on the global scene but not on warping surfaces.
They oversaturate otherwise. */

View file

@ -378,7 +378,7 @@ extern glstate_t gl_state;
void RI_UpdateGamma(void);
/*
* Enables or disabes the vsync.
* Enables or disables the vsync.
*/
void RI_SetVsync(void);

View file

@ -134,7 +134,7 @@ qboolean GL3_IsVsyncActive(void)
}
/*
* Enables or disabes the vsync.
* Enables or disables the vsync.
*/
void GL3_SetVsync(void)
{

View file

@ -502,7 +502,7 @@ R_FindImage(const char *name, imagetype_t type)
return NULL;
}
/* just return white image if show lighmap only */
/* just return white image if show lightmap only */
if ((type == it_wall || type == it_skin) && r_lightmap->value)
{
return r_whitetexture_mip;

View file

@ -155,7 +155,7 @@ typedef struct
// called by GLimp_InitGraphics() *after* creating render
// context. Returns the actual drawable size in the width
// and height variables. This may be differend from the
// and height variables. This may be different from the
// window size due to high dpi awareness.
void (EXPORT *GetDrawableSize)(int* width, int* height);

View file

@ -88,7 +88,7 @@ replacement_t replacements[] = {
{"gl_retexturing", "r_retexturing"},
{"gl_shadows", "r_shadows"},
{"gl_anisotropic", "r_anisotropic"},
{"gl_lightmap", "r_lighmap"},
{"gl_lightmap", "r_lightmap"},
{"gl1_polyblend", "gl_polyblend"},
{"gl_cull", "r_cull"},
{"intensity", "gl1_intensity"}
@ -127,7 +127,7 @@ Cvar_FindVar(const char *var_name)
{
if (!strcmp(var_name, replacements[i].old))
{
Com_Printf("cvar %s ist deprecated, use %s instead\n", replacements[i].old, replacements[i].new);
Com_Printf("cvar %s is deprecated, use %s instead\n", replacements[i].old, replacements[i].new);
var_name = replacements[i].new;
}

View file

@ -419,7 +419,7 @@ FS_FOpenFile(const char *rawname, fileHandle_t *f, qboolean gamedir_only)
}
}
// Pathes starting with a /. I'm not sure if this is
// Paths starting with a /. I'm not sure if this is
// a problem. It shouldn't hurt to remove the leading
// slash, though.
if (rawname[input] == '/' && output == 0)

View file

@ -63,7 +63,7 @@ int time_after_game;
int time_before_ref;
int time_after_ref;
// Used in the network- and input pathes.
// Used in the network- and input paths.
int curtime;
#ifndef DEDICATED_ONLY

View file

@ -605,7 +605,9 @@ Weapon_Generic(edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
int *fire_frames, void (*fire)(edict_t *ent))
{
int n;
const unsigned short int change_speed = (g_swap_speed->value > 0)?(unsigned short int)g_swap_speed->value:1;
const unsigned short int change_speed = (g_swap_speed->value > 1)?
(g_swap_speed->value < USHRT_MAX)? (unsigned short int)g_swap_speed->value : 1
: 1;
if (!ent || !fire_frames || !fire)
{