mirror of
https://github.com/yquake2/ctf.git
synced 2024-11-29 07:02:30 +00:00
Merge pull request #16 from Dremor8484/Dremor8484-ctf-doublebarrelshotgun-aimfix
Update weapon.c
This commit is contained in:
commit
554590fca9
1 changed files with 12 additions and 0 deletions
|
@ -1519,6 +1519,18 @@ weapon_supershotgun_fire(edict_t *ent)
|
||||||
DEFAULT_SHOTGUN_VSPREAD, DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
DEFAULT_SHOTGUN_VSPREAD, DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
||||||
v[YAW] = ent->client->v_angle[YAW] + 5;
|
v[YAW] = ent->client->v_angle[YAW] + 5;
|
||||||
AngleVectors(v, forward, NULL, NULL);
|
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,
|
fire_shotgun(ent, start, forward, damage, kick,
|
||||||
DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD,
|
DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD,
|
||||||
DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
DEFAULT_SSHOTGUN_COUNT / 2, MOD_SSHOTGUN);
|
||||||
|
|
Loading…
Reference in a new issue