mirror of
https://git.code.sf.net/p/quake/nuq
synced 2024-11-24 13:01:49 +00:00
Added frikac's chasecam improvements from quakesrc.org.
This commit is contained in:
parent
ba6d26302a
commit
bc6f3bbb14
3 changed files with 17 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue