extern matrix4x4_t viewmodelmatrix;
#include "cl_collision.h"
+#include "csprogs.h"
/*
==================
entity_t *ent;
float vieworg[3], gunorg[3], viewangles[3];
trace_t trace;
+ if(csqc_loaded)
+ return;
+ VectorClear(gunorg);
Matrix4x4_CreateIdentity(&viewmodelmatrix);
Matrix4x4_CreateIdentity(&r_refdef.viewentitymatrix);
if (cls.state == ca_connected && cls.signon == SIGNONS)
{
double xyspeed, bob;
- xyspeed = sqrt(cl.movement_velocity[0]*cl.movement_velocity[0] + cl.movement_velocity[1]*cl.movement_velocity[1]);
+ xyspeed = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]);
if (cl_bob.value && cl_bobcycle.value)
{
float cycle;
Matrix4x4_CreateFromQuakeEntity(&r_refdef.viewentitymatrix, vieworg[0], vieworg[1], vieworg[2], viewangles[0], viewangles[1], viewangles[2] + v_idlescale.value * sin(cl.time*v_iroll_cycle.value) * v_iroll_level.value, 1);
// calculate a viewmodel matrix for use in view-attached entities
Matrix4x4_CreateFromQuakeEntity(&viewmodelmatrix, gunorg[0], gunorg[1], gunorg[2], viewangles[0], viewangles[1], viewangles[2], 0.3);
+ VectorCopy(vieworg, csqc_origin);
+ VectorCopy(viewangles, csqc_angles);
}
}
}
r_refdef.viewblend[1] = 0;
r_refdef.viewblend[2] = 0;
r_refdef.viewblend[3] = 0;
- r_refdef.fovscale_x = cl.viewzoom;
- r_refdef.fovscale_y = cl.viewzoom;
+ r_refdef.frustumscale_x = 1;
+ r_refdef.frustumscale_y = 1;
if (cls.state == ca_connected && cls.signon == SIGNONS && gl_polyblend.value > 0)
{
// set contents color
supercontents = CL_PointSuperContents(vieworigin);
if (supercontents & SUPERCONTENTS_LIQUIDSMASK)
{
- r_refdef.fovscale_x *= 1 - (((sin(cl.time * 4.7) + 1) * 0.015) * r_waterwarp.value);
- r_refdef.fovscale_y *= 1 - (((sin(cl.time * 3.0) + 1) * 0.015) * r_waterwarp.value);
+ r_refdef.frustumscale_x *= 1 - (((sin(cl.time * 4.7) + 1) * 0.015) * r_waterwarp.value);
+ r_refdef.frustumscale_y *= 1 - (((sin(cl.time * 3.0) + 1) * 0.015) * r_waterwarp.value);
if (supercontents & SUPERCONTENTS_LAVA)
{
cl.cshifts[CSHIFT_CONTENTS].destcolor[0] = 255;