From: FruitieX Date: Mon, 7 Jun 2010 16:39:06 +0000 (+0300) Subject: remove dupes of the hud_configure global, show crosshair in hud_configure mode, use... X-Git-Tag: xonotic-v0.1.0preview~541^2~106^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8c78880735116bcb4292a54041bbee4646464a3e;p=xonotic%2Fxonotic-data.pk3dir.git remove dupes of the hud_configure global, show crosshair in hud_configure mode, use cl_lockview in hud_configure for better results :) --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 3ed62834a..1d6b85d3b 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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; diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 8198639a4..667b91b5a 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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