From ab58bc5a378023f71c6b55f1cc199b92cf3ef2ba Mon Sep 17 00:00:00 2001 From: Dremor8484 <104323765+Dremor8484@users.noreply.github.com> Date: Fri, 10 Jun 2022 19:27:04 +0200 Subject: [PATCH] Update weapon.c ctf-doublebarrelshotgun-aimfix --- src/player/weapon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/player/weapon.c b/src/player/weapon.c index 5a9edf8..bf9e9a1 100644 --- a/src/player/weapon.c +++ b/src/player/weapon.c @@ -1519,6 +1519,18 @@ weapon_supershotgun_fire(edict_t *ent) DEFAULT_SHOTGUN_VSPREAD, DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN); v[YAW] = ent->client->v_angle[YAW] + 5; AngleVectors(v, forward, NULL, NULL); + + if (aimfix->value) + { + AngleVectors(v, forward, right, NULL); + + VectorScale(forward, -2, ent->client->kick_origin); + ent->client->kick_angles[0] = -2; + + VectorSet(offset, 0, 8, ent->viewheight - 8); + P_ProjectSource(ent, offset, forward, right, start); + } + fire_shotgun(ent, start, forward, damage, kick, DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD, DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);