Event chasecam fixes done in Xonotic
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 May 2011 14:27:59 +0000 (17:27 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 May 2011 14:27:59 +0000 (17:27 +0300)
data/qcsrc/client/View.qc

index 6ae6d038c7a7b80db19593a418452c6ea1aa2417..84e80140a1ed144070121b10f0a93837de6d110f 100644 (file)
@@ -322,6 +322,7 @@ void CSQC_UpdateView(float w, float h)
                        eventchase_target_origin = pmove_org - v_forward * eventchase_current_distance * (trace_fraction - 0.1);\r
 \r
                        R_SetView(VF_ORIGIN, eventchase_target_origin);\r
                        eventchase_target_origin = pmove_org - v_forward * eventchase_current_distance * (trace_fraction - 0.1);\r
 \r
                        R_SetView(VF_ORIGIN, eventchase_target_origin);\r
+                       R_SetView(VF_ANGLES, view_angles);\r
                }\r
                else if(cvar("chase_active") < 0) // time to disable chase_active if it was set by this code\r
                {\r
                }\r
                else if(cvar("chase_active") < 0) // time to disable chase_active if it was set by this code\r
                {\r
@@ -747,7 +748,7 @@ void CSQC_UpdateView(float w, float h)
                        cvar_set("r_glsl_postprocess_uservec2_enable", ftos(cvar("hud_powerup") != 0));\r
 \r
                // lets apply the postprocess effects from the previous two functions if needed\r
                        cvar_set("r_glsl_postprocess_uservec2_enable", ftos(cvar("hud_powerup") != 0));\r
 \r
                // lets apply the postprocess effects from the previous two functions if needed\r
-               if(damage_blurpostprocess_x || content_blurpostprocess_x)\r
+               if((damage_blurpostprocess_x || content_blurpostprocess_x) && cvar("chase_active") >= 0) // not while the event camera is active\r
                {\r
                        float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, cvar("hud_postprocessing_maxblurradius"));\r
                        float bluralpha = bound(0, damage_blurpostprocess_z + content_blurpostprocess_z, cvar("hud_postprocessing_maxbluralpha"));\r
                {\r
                        float blurradius = bound(0, damage_blurpostprocess_y + content_blurpostprocess_y, cvar("hud_postprocessing_maxblurradius"));\r
                        float bluralpha = bound(0, damage_blurpostprocess_z + content_blurpostprocess_z, cvar("hud_postprocessing_maxbluralpha"));\r
@@ -771,7 +772,7 @@ void CSQC_UpdateView(float w, float h)
                if (getstatf(STAT_INVINCIBLE_FINISHED) - time > 0)\r
                        sharpen_intensity += (getstatf(STAT_INVINCIBLE_FINISHED) - time);\r
 \r
                if (getstatf(STAT_INVINCIBLE_FINISHED) - time > 0)\r
                        sharpen_intensity += (getstatf(STAT_INVINCIBLE_FINISHED) - time);\r
 \r
-               if(cvar("hud_powerup") && sharpen_intensity > 0)\r
+               if(cvar("hud_powerup") && sharpen_intensity > 0 && cvar("chase_active") >= 0) // not while the event camera is active\r
                {\r
                        sharpen_intensity = bound(0, sharpen_intensity, 5); // powerup warning time is 5 seconds, so fade the effect from there\r
 \r
                {\r
                        sharpen_intensity = bound(0, sharpen_intensity, 5); // powerup warning time is 5 seconds, so fade the effect from there\r
 \r