-
-
-// transform the view offset by the model's matrix to get the offset from
-// model origin for the view
- ent->angles[YAW] = cl.viewangles[YAW]; // the model should face the view dir
- ent->angles[PITCH] = -cl.viewangles[PITCH]; // the model should face the view dir
-
-
- bob = V_CalcBob ();
-
-// refresh position
- VectorCopy (ent->origin, r_refdef.vieworg);
- r_refdef.vieworg[2] += cl.viewheight + bob;
-
-// never let it sit exactly on a node line, because a water plane can
-// dissapear when viewed with the eye exactly on it.
-// the server protocol only specifies to 1/16 pixel, so add 1/32 in each axis
- r_refdef.vieworg[0] += 1.0/32;
- r_refdef.vieworg[1] += 1.0/32;
- r_refdef.vieworg[2] += 1.0/32;
-
- VectorCopy (cl.viewangles, r_refdef.viewangles);
- V_CalcViewRoll ();
- V_AddIdle ();
-
-// offsets
- angles[PITCH] = -ent->angles[PITCH]; // because entity pitches are
- // actually backward
- angles[YAW] = ent->angles[YAW];
- angles[ROLL] = ent->angles[ROLL];
-
- AngleVectors (angles, forward, right, up);