Commit graph

306 commits

Author SHA1 Message Date
Jaime Moreira
8ea7bcd495 Added missing include for USHRT_MAX 2023-09-15 11:58:16 -03:00
Yamagi
1c52428172
Merge pull request #118 from protocultor/g_swap_speed_fix
Fix for g_swap_speed behaviour with extreme values
2023-09-14 21:26:57 +02:00
Jaime Moreira
2469740598 Typos 2023-08-26 23:18:53 -04:00
Jaime Moreira
92a00c9f5d 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 weapon animation.
2023-08-26 22:59:49 -04:00
BjossiAlfreds
70c4c50951 Fix minor AI glitches with turrets 2023-08-22 20:14:47 +00:00
BjossiAlfreds
452ad99821 Fixed gunner grenade duck code running twice 2023-07-24 21:42:18 +00:00
BjossiAlfreds
dd0f1a8a61 T_Damage no longer modifies dir parameter 2023-07-07 23:51:47 +00:00
Jaime Moreira
8319109c9f 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:46:43 -04:00
Jaime Moreira
15c531c300 Cheat cvar "g_swap_speed" implemented
Allows to skip frames of "putting down weapon" and
"raising weapon" animations, speeding them up.
2023-06-28 16:25:09 -04:00
BjossiAlfreds
46660b8902 Fixes to makron jump sequence 2023-06-07 13:40:50 +00:00
BjossiAlfreds
71b5f5cf95 Fixed wrong Tank muzzle flash 2023-06-02 13:21:54 +00:00
Yamagi
c8914dd482
Merge pull request #103 from BjossiAlfreds/intersight
Fixed monsters seeing players during intermissions
2023-05-13 15:30:54 +02:00
BjossiAlfreds
306beceb0c Fixed ungibbable makron parts 2023-05-09 18:29:55 +00:00
BjossiAlfreds
004ff57649 Fixed monsters seeing players during intermissions 2023-04-26 01:35:00 +00:00
BjossiAlfreds
4a9c7f897e Fixed stand-ground gladiators not attacking at certain range 2023-04-22 18:52:34 +00:00
Dremor8484
5d767c6b30
Update g_items.c
ammopak usually increase the maximum ammo, even beyond the bandolier.
i suppose there is a bug with fletchette ammo.

fletchette starts with 200 max ammo, becomes 250 max ammo with bandolier and returns to 200 max ammo with ammopack.
on the contrary both cells and bullets start at 200, becomes 250 with bandolier and 300 with ammopack.
2023-03-20 15:47:12 +01:00
Dremor8484
e2ac13dae4
Update weapon.c
the aimfix was working only on half of the attack, since the supershotgun shoots 2 times (half bullets left, half bullets right)

to carefully test it i tried to comment out 1 of the 2 shots while also keep yaw change to 0
in 1 case the bullets hit around the crossair, in the other case the bullets were not centered around the crossair.

i added the same fix to the shot that did not have it, and it worked.

i tested it out with yaw-5 and yaw+5 with both shots shooting at the same time and the bullets appeared to gather into 2 distinct clusters one left side of crossair, one right side of crossair like 2 eyes on the wall
2022-12-03 15:47:14 +01:00
David CARLIER
a4747d3d8d va little signature change 2022-11-05 10:27:06 +00:00
Yamagi
5ed36196b7
Merge pull request #94 from skullernet/master
Remove broken pusher delta yaw manipulation
2022-10-08 15:38:53 +02:00
Yamagi
0dda457eb5
Merge pull request #98 from BjossiAlfreds/collision
Prevent dead bodies from obstructing elevators and falling through them
2022-10-08 15:37:59 +02:00
Yamagi
fb2f6bd3b5
Merge pull request #97 from BjossiAlfreds/powercubes
Fix coop power cube related bugs
2022-10-08 15:37:42 +02:00
Yamagi
f15c5c57a2
Merge pull request #96 from BjossiAlfreds/splashes
Fix items already in water at level start playing splash sound
2022-10-08 15:37:27 +02:00
BjossiAlfreds
3bb2602f5b Prevent dead bodies from obstructing elevators and falling through them 2022-09-30 15:25:18 +00:00
BjossiAlfreds
eff7705812 Fix coop power cube related bugs 2022-09-24 14:33:38 +00:00
BjossiAlfreds
678eee9bc7 Fix items already in water at level start playing splash sound 2022-09-24 12:23:49 +00:00
BjossiAlfreds
2f76831f1c Prevented crash or memory corruption when flood_msgs is too high or too low 2022-09-24 01:49:35 +00:00
Andrey Nazarov
213b14e16a Remove broken pusher delta yaw manipulation.
This didn't work correctly for multiple reasons:

1. `deltayaw` was wrongly initialized for the pusher itself, rather than
for pushed client.

2. `delta_angles[YAW]` is a short, adding plain `amove[YAW]` to it is
wrong.

To support yaw angle rotation properly, delta_angles must be
interpolated on the client. But this is hardly practical as it would
introduce other bugs. Thus, simply remove delta yaw manipulation code
altogether.

Fixes infamous Q2 bug when player standing on a blocked lift gets turned
to wrong direction.
2022-09-09 21:55:04 +03:00
Jaime Moreira
6b9331ea5f Faster weapon switching with 'cycleweap'
Allows to skip elements on the weapon list by tapping the same bound key
2022-08-01 14:35:42 -04:00
Dremor8484
6de4a9ce77
Update weapon.c
rogue-doublebarrelshotgun-aimfix
2022-06-10 19:19:18 +02:00
Yamagi
15ffab8518 Fix of by one in Info_SetValueForKey(). Found by ASAN. 2022-05-28 11:35:08 +02:00
Jaime Moreira
20da96d0ab Added prefweap command to select weapon by priority 2022-04-11 09:53:13 -04:00
Yamagi
f63c952103 Fix door_go_up(), G_UseTargets() exiting early if no activator is given.
The problem in door_go_up() may prevent doors from crushing something
blocking them. The problem in G_UseTargets() may prevent targets from
getting killed or fired.

Pointed out by @maraakate.
2022-02-05 17:26:19 +01:00
Yamagi
7d1007ea1e 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:25:42 +01:00
BjossiAlfreds
2dd8c74dfd Fixed player_noise entity leak and improved stability surrounding player noises 2021-11-06 02:23:45 +00:00
Yamagi
d272c24706 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:15:10 +01:00
Yamagi
8cba5293a0 Made the game able to handle entity overload better.
This is a port of yquake2 commit c3b57bc8.
2021-11-04 17:11:41 +01:00
De-Seppe
ea57b889b6 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:18 +02:00
De-Seppe
73beecec44 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:14:38 +02:00
Yamagi
19a6d805a9 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:39:09 +02:00
BjossiAlfreds
3bccc4bd79 Fix for some player sound bugs 2021-04-30 01:07:40 +00:00
BjossiAlfreds
d1ddda04ea Shark bbox fix and added inuse check after entity thinking 2021-04-18 01:27:18 +00:00
BjossiAlfreds
cc6bf7dd5f killtarget monsters update killcounter correctly 2021-04-16 00:04:13 +00:00
David CARLIER
a395fadf07 savegame to match more main repo 2021-04-12 21:35:20 +01:00
David Carlier
a000d06300 game data packing representation of the headers 2021-04-07 18:12:53 +01:00
BjossiAlfreds
a4fba01b97 Console warning and fix triggered monsters with no targetname 2021-03-28 17:00:26 +00:00
Yamagi
b0303c1098 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:20:43 +01:00
Denis Pauk
0d2d20fc6e Fix function prototypes 2021-01-26 21:20:39 +02:00
Daniel Gibson
b92383eff9 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-5" and added a quirk for older savegameversions:
On Windows i386 savegames that contain "AMD64" instead of "i386" as
architecture are also accepted.
(For YQ2-2 this didn't seem necessary, apparently "i386" was hardcoded)
2021-01-14 03:05:15 +01:00
Yamagi
e8f8a1309c Fix P_ProjectSource() forward declaration.
This was reported in yquake2#631.
2020-12-09 15:29:14 +01:00
Yamagi
9dfd9de811 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:22:31 +02:00