Added frikac's chasecam improvements from quakesrc.org.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2000-12-05 05:59:20 +00:00
parent ba6d26302a
commit bc6f3bbb14
3 changed files with 17 additions and 2 deletions

View file

@ -101,7 +101,10 @@ void Chase_Update (void)
dist = 1;
r_refdef.viewangles[PITCH] = -atan(stop[2] / dist) / M_PI * 180;
TraceLine(r_refdef.vieworg, chase_dest, stop);
if (Length(stop) != 0)
VectorCopy(stop, chase_dest);
// move towards destination
VectorCopy (chase_dest, r_refdef.vieworg);
}

View file

@ -706,6 +706,9 @@ static void R_DrawEntitiesOnList (void)
continue;
currententity = cl_visedicts[i];
if (currententity == &cl_entities[cl.viewentity])
currententity->angles[PITCH] *= 0.3;
R_DrawAliasModel (currententity);
}

View file

@ -35,6 +35,7 @@
#include "console.h"
#include "view.h"
#include "screen.h"
#include "chase.h"
//define PASSAGES
@ -578,7 +579,12 @@ void R_DrawEntitiesOnList (void)
currententity = cl_visedicts[i];
if (currententity == &cl_entities[cl.viewentity])
continue; // don't draw the player
{
if (!chase_active->int_val)
continue; // don't draw the player
else
currententity->angles[PITCH] *= 0.3;
}
switch (currententity->model->type)
{
@ -652,6 +658,9 @@ void R_DrawViewModel (void)
if (!r_drawviewmodel->int_val || r_fov_greater_than_90)
return;
if (chase_active->int_val)
return;
if (cl.items & IT_INVISIBILITY)
return;