Commit Graph

312 Commits

Author SHA1 Message Date
Yamagi eb55860150
Merge pull request #76 from BjossiAlfreds/flood
Prevent crash or memory corruption when flood_msgs is too high or too low
2022-10-08 15:33:23 +02:00
BjossiAlfreds 8431e0f15d Prevent crash or memory corruption when flood_msgs is too high or too low 2022-09-24 01:50:15 +00:00
Yamagi 8fb33ee9fd
Merge pull request #74 from protocultor/cycleweap_quick
Faster weapon switching with 'cycleweap'
2022-08-07 18:21:53 +02:00
Jaime Moreira 5e31017f49 Faster weapon switching with 'cycleweap'
Allows to skip elements on the weapon list by tapping the same bound key
2022-08-01 14:34:49 -04:00
Yamagi f4643f174f
Merge pull request #73 from Dremor8484/Dremor8484-xatrix-doublebarrelshotgun-aimfix
Update weapon.c
2022-06-11 17:03:03 +02:00
Dremor8484 368df08757
Update weapon.c
xatrix-doublebarrelshotgun-aimfix
2022-06-10 19:10:19 +02:00
Yamagi 8d6a6188c3 Fix off by one in Info_SetValueForKey(). Found by ASAN. 2022-05-28 11:40:09 +02:00
Yamagi 141458257f Update CHANGELOG for 2.10. 2022-05-28 11:40:09 +02:00
Yamagi 39e4828a65
Merge pull request #71 from devnexen/build_macos_arm_fix
Forcing proper native arch build on darwin mainly due to arm64
2022-05-20 12:48:53 +02:00
David CARLIER 67f45e6a33 Forcing proper native arch build on darwin mainly due to arm64 2022-05-14 16:29:14 +01:00
Yamagi fdf95542f2
Merge pull request #70 from protocultor/prefweap
Added prefweap command to select weapon by priority
2022-04-13 11:51:11 +02:00
Jaime Moreira d0ec2a5c72 Added prefweap command to select weapon by priority 2022-04-11 09:39:52 -04:00
Yamagi 4c65436342 Fix door_go_up() exiting early.
The problem in door_go_up() may prevent doors from crushing something
blocking them. While add it sanity check `activator` in
`G_UseTargets()`.
2022-02-05 17:18:27 +01:00
Yamagi f97f46f91d Force an `MASK_SHOT` 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 `MASK_SHOT`.

Suggested by @BjossiAlfreds.
2022-02-05 17:14:48 +01:00
Yamagi dfd2224bbf Fix laser guard trying to fire two shots when dying.
The laser guard is implemented different than the other guards, the
'last stand' animation doesn't match the implementation. Work around
that by avoid that animation.

Found by @drakonorodny and fix suggested by @BjossiAlfreds.

Closes #68.
2021-11-13 12:43:09 +01:00
Yamagi a7eb445151
Merge pull request #69 from BjossiAlfreds/playernoise
Fixed player_noise entity leak and improved stability surrounding player noises
2021-11-06 08:48:41 +01:00
BjossiAlfreds 0a4c45ddf2 Fixed player_noise entity leak and improved stability surrounding player noises 2021-11-06 02:24:28 +00:00
Yamagi 640d01364c 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.
2021-11-05 07:12:05 +01:00
Yamagi f6b76c2374 Made the game able to handle entity overload better.
This is a port of yquake2 commit c3b57bc8.
2021-11-04 16:56:34 +01:00
Yamagi e67c63a03e
Merge pull request #67 from De-Seppe/master
Feature request : add cvar to disable machine gun recoil in single player #741 (xatrix)
2021-09-28 18:34:21 +02:00
De-Seppe 020b142e7b Rename variable to conform to naming guidelines
Change the name of the cvar machinegun_norecoil to g_machinegun_norecoil to conform to the naming guidelines
2021-09-27 18:30:32 +02:00
De-Seppe aa2a3fcda2 Add cvar machinegun_norecoil
Add cvar machinegun_norecoil
This cvar allows to disable machinegun recoil in single player.
The default value is the original Quake 2 behaviour.
2021-09-27 13:11:37 +02:00
Yamagi f6d8c0fe61 Refine the `g_footstep` cvar.
There were complains that always generating footsteps is annoying,
because there will be footsteps while swimming or jumping. Refine
the cvar a little bit:

* `0`: No footsteps at all.
* `1`: Vanilla Quake II behavior.
* `2`: Always footsteps as long as the player has a ground entity.
* `3`: Always footsteps.

The changes the meaning of the values, `2` has become `3`.

Closes yquake2/yquake2#738.
2021-08-25 18:35:41 +02:00
Yamagi c53bb15688 Add a warning that the CMakeLists.txt is unmaintained. 2021-07-23 08:34:10 +02:00
Yamagi 052066f355 Revert "Retire unmaintained CMakeLists.txt."
It turned out that there're some special cases not (yet) covered by the
Makefile. Crossbuilding in specialized chroot environments are one
example.
2021-07-23 08:29:01 +02:00
Yamagi 15791dc75e Retire unmaintained CMakeLists.txt.
I added the CMakeLists.txt 6 or 7 years ago so I could load the code
into Jetbrains Clion. I have moved to another editor years ago and the
cmake stuff is effectively unmaintained since then. We kept it around
in case that we'll do a MSVC port, but that's unlikely at this point.
Since bugreport and problems with the CMakeLists.txt keep coming up,
finally retire them. They can be resurrected from the git history if
we'll ever need them again.

Part of yquake2/yquake2#725.
2021-06-29 11:02:33 +02:00
Yamagi 2e2fac5a85 Update the CHANGELOG for version 2.09. 2021-06-14 16:26:32 +02:00
Yamagi f4ae2e8c8b
Merge pull request #65 from BjossiAlfreds/player-sounds
Fix for some player sound bugs
2021-04-30 11:51:51 +02:00
BjossiAlfreds 99d0187651 Fix for some player sound bugs 2021-04-30 01:06:49 +00:00
Yamagi 32304256d5
Merge pull request #64 from BjossiAlfreds/shark-bbox
Shark bbox fix and added inuse check after entity thinking
2021-04-27 08:59:33 +02:00
BjossiAlfreds dd6afd3b03 Shark bbox fix and added inuse check after entity thinking 2021-04-18 01:26:33 +00:00
Yamagi c25547e041
Merge pull request #63 from devnexen/savegame_upd_to_match_yquake2
savegame to match more main repo
2021-04-13 12:58:55 +02:00
David CARLIER 38bc24cfe7 savegame to match more main repo 2021-04-12 21:34:55 +01:00
Yamagi 024ee7ca09
Merge pull request #62 from devnexen/savegame_data_packing
game data packing representation of the headers
2021-04-08 10:59:44 +02:00
Yamagi 9016b12ce5
Merge pull request #61 from BjossiAlfreds/map-fixes
Map fixes for unkillable monsters
2021-04-08 10:59:22 +02:00
David Carlier 2a6ea6014a game data packing representation of the headers 2021-04-07 18:12:12 +01:00
BjossiAlfreds 9a19ec8946 Made invul in xintell into a counted secret 2021-04-02 21:21:52 +00:00
BjossiAlfreds 9a046f4aef Map fixes for unkillable monsters 2021-04-02 08:47:15 +00:00
Yamagi 9ea02cab1c
Merge pull request #60 from BjossiAlfreds/bad-triggered
Console warning and fix triggered monsters without targetname
2021-03-31 10:06:58 +02:00
BjossiAlfreds 0447bbc4f8 Console warning and fix triggered monsters without targetname 2021-03-28 16:55:43 +00:00
Yamagi c6aeffb484 Add a cvar `g_footsteps` to control the generation of footstep sound.
1: The Vanilla Quake II behaviour, footsteps are generated when the
   player is faster than 255.
0: Footstep sounds are never generated.
2: Footstep sounds are always generated.

Defaults to `1`
2021-03-02 15:14:23 +01:00
Yamagi 5e7fc8fbb0
Merge pull request #59 from 0lvin/master
Fix function prototypes
2021-01-27 08:32:23 +01:00
Denis Pauk caac536e21 Fix function prototypes 2021-01-26 21:15:44 +02:00
Daniel Gibson 5bc4d8d092 Fix architecture detection on Windows in Makefile, bump SAVEGAMEVER
$PROCESSOR_ARCHITECTURE seems to contain the architecture of the host,
but we need the architecture the current MinGW shell is targeting.
$MINGW_CHOST seems to be just that, and on my system it's either
i686-w64-mingw32 (mingw32.exe) or x86_64-w64-mingw32 (mingw64.exe)
(No idea what it looks like for Windows on ARM...)

As fixing this would otherwise break existing savegames, I bumped the
SAVEGAMEVER to "YQ2-4" and added a quirk for older savegameversions:
On Windows i386 savegames that contain "AMD64" instead of "i386" as
architecture are also accepted.
(For YQ2-1 this didn't seem necessary, apparently "i386" was hardcoded)
2021-01-14 03:26:31 +01:00
Yamagi 6a287d6a51 Fix P_ProjectSource() forward declaration.
This was reported in yquake2#631.
2020-12-09 15:26:52 +01:00
Yamagi c1e438e697 Implemented `coop_elevator_delay` cvar (for func_plat)
In coop it's often hard to get on the same elevator together, because
they're immediately triggered once the first player steps on it.
This cvar sets a delay (1 second by default) for the elevator to wait
before moving, so other players have some time to get on it.
If you like elevators/platforms that suck, just set it to `0` :-P

Currently only used in func_plat, if it turns out that other entities
are used for automatically triggered platforms, we'll have to adapt
those as well (I guess wait_and_change() is generally useful for that).

We're not bumping the savegame version because they should only break in
an uncommon corner case: *Coop* savegames created with clients including
this change will not work on older clients - SP savegames are not
affected and old savegames on new clients also still work.
2020-08-10 14:12:12 +02:00
Yamagi 82f9f01d6b Add `coop_pickup_weapons`, allow a weapon to be taken several times.
In coop a weapon can be picked up only once. That's annoying, because in
coop ammunition is sparse and not getting the ammunition that comes with
a weapons make things worse. When `coop_pickup_weapons` is set to `1` a
weapon may be picked up if:

1) The player doesn't have the weapon in their inventory.
2) No other player has already picked it up.
2020-08-10 14:11:57 +02:00
Yamagi d8d3b21e64 Fix crash with some projectiles generating sound targets.
Some projectiles like grenades or rockets are classified as enemies.
Their explosion spawn a sound entity, monsters should move to that. But
the projectile is destroyed when exploding, it's entity struct is set to
NULL. Therefor the self->enemy pointer is also NULL. The self->enemy
check was removed in bc5f5698. Work around this by pretending that the
enemy is already there.

This was reported by @Soldy, closes #56.
2020-06-04 08:04:15 +02:00
Yamagi e8a891d6a9 Fix the Jork skin bug.
Submitted for baseq2 by @kondrak in yquake2#575.
2020-05-11 12:57:55 +02:00
Yamagi 55cdf7b1ac
Merge pull request #55 from BjossiAlfreds/gunner-idle
Fix for gunner AI freeze bug
2020-05-11 11:41:24 +02:00