22 vec3_t o, ownerv, goal;
30 if (!ent->client->chase_target->inuse
31 || ent->client->chase_target->client->resp.spectator) {
32 edict_t *old = ent->client->chase_target;
34 if (ent->client->chase_target == old) {
35 ent->client->chase_target = NULL;
36 ent->client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
41 targ = ent->client->chase_target;
43 VectorCopy(targ->s.origin, ownerv);
45 ownerv[2] += targ->viewheight;
47 VectorCopy(targ->client->v_angle, angles);
48 if (angles[PITCH] > 56)
52 VectorMA(ownerv, -30,
forward, o);
54 if (o[2] < targ->s.origin[2] + 20)
55 o[2] = targ->s.origin[2] + 20;
58 if (!targ->groundentity)
63 VectorCopy(trace.endpos, goal);
65 VectorMA(goal, 2,
forward, goal);
71 if (trace.fraction < 1) {
72 VectorCopy(trace.endpos, goal);
79 if (trace.fraction < 1) {
80 VectorCopy(trace.endpos, goal);
85 ent->client->ps.pmove.pm_type = PM_DEAD;
87 ent->client->ps.pmove.pm_type = PM_FREEZE;
89 VectorCopy(goal, ent->s.origin);
90 for (i = 0 ; i < 3 ; i++)
91 ent->client->ps.pmove.delta_angles[i] = ANGLE2SHORT(targ->client->v_angle[i] - ent->client->resp.cmd_angles[i]);
94 ent->client->ps.viewangles[ROLL] = 40;
95 ent->client->ps.viewangles[PITCH] = -15;
96 ent->client->ps.viewangles[YAW] = targ->client->killer_yaw;
98 VectorCopy(targ->client->v_angle, ent->client->ps.viewangles);
99 VectorCopy(targ->client->v_angle, ent->client->v_angle);
103 ent->client->ps.pmove.pm_flags |= PMF_NO_PREDICTION;