mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
Yet more diff noise reduction.
This commit is contained in:
parent
c8e3cf05d0
commit
8dc1961e8c
2 changed files with 19 additions and 10 deletions
|
@ -179,6 +179,7 @@ static void
|
||||||
V_DriftPitch (void)
|
V_DriftPitch (void)
|
||||||
{
|
{
|
||||||
float delta, move;
|
float delta, move;
|
||||||
|
usercmd_t *cmd = &cl.cmd;
|
||||||
|
|
||||||
if (noclip_anglehack || cl.onground == -1 || cls.demoplayback) {
|
if (noclip_anglehack || cl.onground == -1 || cls.demoplayback) {
|
||||||
cl.driftmove = 0;
|
cl.driftmove = 0;
|
||||||
|
@ -188,7 +189,7 @@ V_DriftPitch (void)
|
||||||
|
|
||||||
// don't count small mouse motion
|
// don't count small mouse motion
|
||||||
if (cl.nodrift) {
|
if (cl.nodrift) {
|
||||||
if (fabs (cl.cmd.forwardmove) < cl_forwardspeed->value)
|
if (fabs (cmd->forwardmove) < cl_forwardspeed->value)
|
||||||
cl.driftmove = 0;
|
cl.driftmove = 0;
|
||||||
else
|
else
|
||||||
cl.driftmove += host_frametime;
|
cl.driftmove += host_frametime;
|
||||||
|
@ -232,6 +233,8 @@ V_ParseDamage (void)
|
||||||
entity_t *ent = &cl_entities[cl.viewentity];
|
entity_t *ent = &cl_entities[cl.viewentity];
|
||||||
float count, side;
|
float count, side;
|
||||||
int armor, blood;
|
int armor, blood;
|
||||||
|
vec_t *origin = ent->origin;
|
||||||
|
vec_t *angles = ent->angles;
|
||||||
vec3_t from, forward, right, up;
|
vec3_t from, forward, right, up;
|
||||||
|
|
||||||
armor = MSG_ReadByte (net_message);
|
armor = MSG_ReadByte (net_message);
|
||||||
|
@ -267,10 +270,10 @@ V_ParseDamage (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate view angle kicks
|
// calculate view angle kicks
|
||||||
VectorSubtract (from, ent->origin, from);
|
VectorSubtract (from, origin, from);
|
||||||
VectorNormalize (from);
|
VectorNormalize (from);
|
||||||
|
|
||||||
AngleVectors (ent->angles, forward, right, up);
|
AngleVectors (angles, forward, right, up);
|
||||||
|
|
||||||
side = DotProduct (from, right);
|
side = DotProduct (from, right);
|
||||||
v_dmg_roll = count * side * v_kickroll->value;
|
v_dmg_roll = count * side * v_kickroll->value;
|
||||||
|
@ -563,8 +566,10 @@ static void
|
||||||
V_CalcViewRoll (void)
|
V_CalcViewRoll (void)
|
||||||
{
|
{
|
||||||
float side;
|
float side;
|
||||||
|
vec_t *angles = cl_entities[cl.viewentity].angles;
|
||||||
|
vec_t *velocity = cl_entities[cl.viewentity].angles;
|
||||||
|
|
||||||
side = V_CalcRoll (cl_entities[cl.viewentity].angles, cl.velocity);
|
side = V_CalcRoll (angles, velocity);
|
||||||
r_data->refdef->viewangles[ROLL] += side;
|
r_data->refdef->viewangles[ROLL] += side;
|
||||||
|
|
||||||
if (v_dmg_time > 0) {
|
if (v_dmg_time > 0) {
|
||||||
|
|
|
@ -184,6 +184,8 @@ static void
|
||||||
V_DriftPitch (void)
|
V_DriftPitch (void)
|
||||||
{
|
{
|
||||||
float delta, move;
|
float delta, move;
|
||||||
|
int frameno = (cls.netchan.outgoing_sequence - 1) & UPDATE_MASK;
|
||||||
|
usercmd_t *cmd = &cl.frames[frameno].cmd;
|
||||||
|
|
||||||
if (view_message->onground == -1 || cls.demoplayback) {
|
if (view_message->onground == -1 || cls.demoplayback) {
|
||||||
cl.driftmove = 0;
|
cl.driftmove = 0;
|
||||||
|
@ -193,9 +195,7 @@ V_DriftPitch (void)
|
||||||
|
|
||||||
// don't count small mouse motion
|
// don't count small mouse motion
|
||||||
if (cl.nodrift) {
|
if (cl.nodrift) {
|
||||||
if (fabs
|
if (fabs (cmd->forwardmove) < cl_forwardspeed->value)
|
||||||
(cl.frames[(cls.netchan.outgoing_sequence - 1) &
|
|
||||||
UPDATE_MASK].cmd.forwardmove) < 200)
|
|
||||||
cl.driftmove = 0;
|
cl.driftmove = 0;
|
||||||
else
|
else
|
||||||
cl.driftmove += host_frametime;
|
cl.driftmove += host_frametime;
|
||||||
|
@ -238,6 +238,8 @@ V_ParseDamage (void)
|
||||||
{
|
{
|
||||||
float count, side;
|
float count, side;
|
||||||
int armor, blood;
|
int armor, blood;
|
||||||
|
vec_t *origin = cl.simorg;
|
||||||
|
vec_t *angles = cl.simangles;
|
||||||
vec3_t from, forward, right, up;
|
vec3_t from, forward, right, up;
|
||||||
|
|
||||||
armor = MSG_ReadByte (net_message);
|
armor = MSG_ReadByte (net_message);
|
||||||
|
@ -273,10 +275,10 @@ V_ParseDamage (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate view angle kicks
|
// calculate view angle kicks
|
||||||
VectorSubtract (from, cl.simorg, from);
|
VectorSubtract (from, origin, from);
|
||||||
VectorNormalize (from);
|
VectorNormalize (from);
|
||||||
|
|
||||||
AngleVectors (cl.simangles, forward, right, up);
|
AngleVectors (angles, forward, right, up);
|
||||||
|
|
||||||
side = DotProduct (from, right);
|
side = DotProduct (from, right);
|
||||||
v_dmg_roll = count * side * v_kickroll->value;
|
v_dmg_roll = count * side * v_kickroll->value;
|
||||||
|
@ -568,8 +570,10 @@ static void
|
||||||
V_CalcViewRoll (void)
|
V_CalcViewRoll (void)
|
||||||
{
|
{
|
||||||
float side;
|
float side;
|
||||||
|
vec_t *angles = cl.simangles;
|
||||||
|
vec_t *velocity = cl.simvel;
|
||||||
|
|
||||||
side = V_CalcRoll (cl.simangles, cl.simvel);
|
side = V_CalcRoll (angles, velocity);
|
||||||
r_data->refdef->viewangles[ROLL] += side;
|
r_data->refdef->viewangles[ROLL] += side;
|
||||||
|
|
||||||
if (v_dmg_time > 0) {
|
if (v_dmg_time > 0) {
|
||||||
|
|
Loading…
Reference in a new issue