mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
optimise PF_aim for when sv_aim is >= 1 or when the client's noaim is 1
This commit is contained in:
parent
b4d7f0ec96
commit
5e9baaa7c2
1 changed files with 11 additions and 5 deletions
|
@ -877,12 +877,12 @@ PF_aim (progs_t *pr)
|
|||
float speed;
|
||||
const char *noaim;
|
||||
|
||||
if (sv_aim->value >= 1.0) {
|
||||
VectorCopy (*sv_globals.v_forward, G_VECTOR (pr, OFS_RETURN));
|
||||
return;
|
||||
}
|
||||
|
||||
ent = G_EDICT (pr, OFS_PARM0);
|
||||
speed = G_FLOAT (pr, OFS_PARM1);
|
||||
|
||||
VectorCopy (SVvector (ent, origin), start);
|
||||
start[2] += 20;
|
||||
|
||||
// noaim option
|
||||
i = NUM_FOR_EDICT (pr, ent);
|
||||
if (i > 0 && i < MAX_CLIENTS) {
|
||||
|
@ -892,6 +892,12 @@ PF_aim (progs_t *pr)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
speed = G_FLOAT (pr, OFS_PARM1);
|
||||
|
||||
VectorCopy (SVvector (ent, origin), start);
|
||||
start[2] += 20;
|
||||
|
||||
// try sending a trace straight
|
||||
VectorCopy (*sv_globals.v_forward, dir);
|
||||
VectorMA (start, 2048, dir, end);
|
||||
|
|
Loading…
Reference in a new issue