mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
Update weapon.c
phalanx aimfix (like the supershotgun) the first shot (in the if statement) is to the right, the second shot (in the else statement) shoots left without the change to the code 1 shot is centered on the aim cross, the other is on the right with the change to the code the left shot is on the left of the crossair and it touches the left -- of the crossair, while the right shot is on the right and touches the right -- of the crossair
This commit is contained in:
parent
92d83faff4
commit
04868b72ee
1 changed files with 23 additions and 0 deletions
|
@ -2159,6 +2159,17 @@ weapon_phalanx_fire(edict_t *ent)
|
||||||
v[ROLL] = ent->client->v_angle[ROLL];
|
v[ROLL] = ent->client->v_angle[ROLL];
|
||||||
AngleVectors(v, forward, right, up);
|
AngleVectors(v, forward, right, up);
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
radius_damage = 30;
|
radius_damage = 30;
|
||||||
damage_radius = 120;
|
damage_radius = 120;
|
||||||
|
|
||||||
|
@ -2176,6 +2187,18 @@ weapon_phalanx_fire(edict_t *ent)
|
||||||
v[YAW] = ent->client->v_angle[YAW] + 1.5;
|
v[YAW] = ent->client->v_angle[YAW] + 1.5;
|
||||||
v[ROLL] = ent->client->v_angle[ROLL];
|
v[ROLL] = ent->client->v_angle[ROLL];
|
||||||
AngleVectors(v, forward, right, up);
|
AngleVectors(v, forward, right, up);
|
||||||
|
|
||||||
|
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_plasma(ent, start, forward, damage, 725,
|
fire_plasma(ent, start, forward, damage, 725,
|
||||||
damage_radius, radius_damage);
|
damage_radius, radius_damage);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue