]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - view.c
some cleanup of Mod_Alias_GetMesh_Vertex3f
[xonotic/darkplaces.git] / view.c
diff --git a/view.c b/view.c
index cf4513648ab969958376bc76d640489921082a30..7d690e9a987b1ef58cfa268e4e6ddb0231c7e5d5 100644 (file)
--- a/view.c
+++ b/view.c
@@ -70,7 +70,7 @@ cvar_t chase_active = {CVAR_SAVE, "chase_active", "0", "enables chase cam"};
 cvar_t chase_stevie = {0, "chase_stevie", "0", "chase cam view from above (used only by GoodVsBad2)"};
 
 cvar_t v_deathtilt = {0, "v_deathtilt", "1", "whether to use sideways view when dead"};
-cvar_t v_deathtiltangle = {0, "v_deathtilt", "80", "what roll angle to use when tilting the view while dead"};
+cvar_t v_deathtiltangle = {0, "v_deathtiltangle", "80", "what roll angle to use when tilting the view while dead"};
 
 float  v_dmg_time, v_dmg_roll, v_dmg_pitch;
 
@@ -276,10 +276,10 @@ V_cshift_f
 */
 static void V_cshift_f (void)
 {
-       v_cshift.destcolor[0] = atoi(Cmd_Argv(1));
-       v_cshift.destcolor[1] = atoi(Cmd_Argv(2));
-       v_cshift.destcolor[2] = atoi(Cmd_Argv(3));
-       v_cshift.percent = atoi(Cmd_Argv(4));
+       v_cshift.destcolor[0] = atof(Cmd_Argv(1));
+       v_cshift.destcolor[1] = atof(Cmd_Argv(2));
+       v_cshift.destcolor[2] = atof(Cmd_Argv(3));
+       v_cshift.percent = atof(Cmd_Argv(4));
 }
 
 
@@ -406,7 +406,7 @@ void V_CalcRefdef (void)
                                chase_dest[0] = vieworg[0] + forward[0] * dist;
                                chase_dest[1] = vieworg[1] + forward[1] * dist;
                                chase_dest[2] = vieworg[2] + forward[2] * dist + camup;
-                               trace = CL_TraceBox(vieworg, vec3_origin, vec3_origin, chase_dest, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_SKY, false);
+                               trace = CL_TraceBox(vieworg, vec3_origin, vec3_origin, chase_dest, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_SKY, false);
                                VectorMAMAM(1, trace.endpos, 8, forward, 4, trace.plane.normal, vieworg);
                        }
                        else
@@ -430,7 +430,7 @@ void V_CalcRefdef (void)
                                {
                                        double xyspeed, bob;
 
-                                       xyspeed = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]);
+                                       xyspeed = sqrt(cl.movement_velocity[0]*cl.movement_velocity[0] + cl.movement_velocity[1]*cl.movement_velocity[1]);
                                        if (cl_bob.value && cl_bobcycle.value)
                                        {
                                                float cycle;
@@ -559,7 +559,7 @@ void V_CalcViewBlend(void)
                                cl.cshifts[CSHIFT_CONTENTS].destcolor[1] = 80;
                                cl.cshifts[CSHIFT_CONTENTS].destcolor[2] = 50;
                        }
-                       cl.cshifts[CSHIFT_CONTENTS].percent = 150 >> 1;
+                       cl.cshifts[CSHIFT_CONTENTS].percent = 150 * 0.5;
                }
                else
                {