]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
remove dupes of the hud_configure global, show crosshair in hud_configure mode, use...
authorFruitieX <rasse@rasse-lappy.localdomain>
Mon, 7 Jun 2010 16:39:06 +0000 (19:39 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Mon, 7 Jun 2010 16:39:06 +0000 (19:39 +0300)
qcsrc/client/Main.qc
qcsrc/client/View.qc

index 3ed62834ae5379f959a4093c7b2ec7e1e0185c49..1d6b85d3bf228e6003a913db3193d8ec9b5e1f5d 100644 (file)
@@ -633,13 +633,12 @@ void GameCommand(string msg)
 // bInputType = 0 is key pressed, 1 is key released, 2 is mouse input.
 // In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
 // In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
-float hudconf_active;
 float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
        local float bSkipKey;
        bSkipKey = false;
 
-       if(hudconf_active)
+       if(hud_configure)
                if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
                        return true;
 
index 8198639a4c686174d763eb284ccc8a2f17c48bb4..667b91b5ad3504b7cb9e93b2934f0ac76c83ff38 100644 (file)
@@ -372,7 +372,7 @@ void CSQC_UpdateView(float w, float h)
        input_angles = warpzone_fixview_cl_viewangles;
        view_angles = warpzone_fixview_angles;
 
-       if(cvar("cl_lockview"))
+       if(cvar("cl_lockview") || hud_configure)
        {
                pmove_org = freeze_pmove_org;
                input_angles = view_angles = freeze_input_angles;
@@ -395,10 +395,6 @@ void CSQC_UpdateView(float w, float h)
                view_set = 1;
        }
 
-       hudconf_active = cvar("_hud_configure");
-       if(hudconf_active)
-               R_SetView(VF_ANGLES, self.angles); // TODO: this should freeze the view as it is, not change it to '0 0 0' or whatever it currently does...
-
        vid_width = w;
        vid_height = h;
 
@@ -599,7 +595,7 @@ void CSQC_UpdateView(float w, float h)
                                CSQC_common_hud();
 
                // crosshair goes VERY LAST
-               if(!scoreboard_active && !camera_active && !hudconf_active) {
+               if(!scoreboard_active && !camera_active) {
                        // TrueAim check
                        float shottype;
                        float bullets, ring_scale;
@@ -835,7 +831,7 @@ void CSQC_UpdateView(float w, float h)
                cvar_set("vid_conheight", h0);
        }
 
-       if(hudconf_active)
+       if(hud_configure)
                HUD_Panel_Mouse();
        // be safe against triggerbots until everyone has the fixed engine
        // this call is meant to overwrite the trace globals by something