Merge pull request #118 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:26:57 +02:00 committed by GitHub
commit 1c52428172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@ Ground Zero 2.09 to 2.10
a player standing on a blocked elevator gets turned around (by a player standing on a blocked elevator gets turned around (by
skuller). skuller).
- Fix several coop related bugs with the powercubes. (by BjossiAlfreds) - 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) through the worldmodel. (by BjossiAlfreds)
- Fix items already in water playing a splash sound at level start. (by - Fix items already in water playing a splash sound at level start. (by
BjossiAlfreds) BjossiAlfreds)

View File

@ -6,8 +6,8 @@
# # # #
# Dependencies: # # Dependencies: #
# - None, but you need a Quake II to play. # # - None, but you need a Quake II to play. #
# While in theorie every client should work # # While in theory every client should work #
# Yamagi Quake II ist recommended. # # Yamagi Quake II is recommended. #
# # # #
# Platforms: # # Platforms: #
# - FreeBSD # # - FreeBSD #
@ -286,7 +286,7 @@ ROGUE_OBJS_ = \
# ---------- # ----------
# Rewrite pathes to our object directory # Rewrite paths to our object directory
ROGUE_OBJS = $(patsubst %,build/%,$(ROGUE_OBJS_)) ROGUE_OBJS = $(patsubst %,build/%,$(ROGUE_OBJS_))
# ---------- # ----------

View File

@ -697,7 +697,7 @@ SP_info_null(edict_t *self)
/* /*
* QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4) * QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4)
* *
* Used as a positional target for lightning. * Used as a positional target for lighting.
*/ */
void void
SP_info_notnull(edict_t *self) SP_info_notnull(edict_t *self)

View File

@ -691,7 +691,9 @@ Weapon_Generic(edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int F
int FRAME_DEACTIVATE_LAST, int *pause_frames, int *fire_frames, void (*fire)(edict_t *ent)) int FRAME_DEACTIVATE_LAST, int *pause_frames, int *fire_frames, void (*fire)(edict_t *ent))
{ {
int n; 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) if (!ent || !fire)
{ {