Merge branch 'master' into terencehill/cursormode
authorterencehill <piuntn@gmail.com>
Sun, 29 Jan 2012 15:39:57 +0000 (16:39 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 29 Jan 2012 15:39:57 +0000 (16:39 +0100)
Conflicts:
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc

1  2 
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/csqc_builtins.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc

Simple merge
@@@ -445,10 -465,10 +465,10 @@@ void CSQC_UpdateView(float w, float h
        }
        
        // do lockview after event chase camera so that it still applies whenever necessary.
 -      if(autocvar_cl_lockview || (autocvar__hud_configure && spectatee_status <= 0) || intermission > 1)
 +      if(autocvar_cl_lockview || intermission > 1)
        {
-               R_SetView(VF_ORIGIN, freeze_org);
-               R_SetView(VF_ANGLES, freeze_ang);
+               setproperty(VF_ORIGIN, freeze_org);
+               setproperty(VF_ANGLES, freeze_ang);
        }
        else
        {
@@@ -120,12 -120,11 +120,12 @@@ void (string s, ...)                                                    print = #339
  void (float scale)                                                    setsensitivityscale = #346;
  
  
void (float framenum)                                                 RetrieveMovementFrame = #345;
- void ()                                                                       DefaultPlayerPhysics = #347;
float (float framenum)                                                        getinputstate = #345;
+ void (entity e)                                                                       runstandardplayerphysics = #347;
  
- string (float playernum, string key)                                  getplayerkey = #348;
+ string (float playernum, string key)                                  getplayerkeyvalue = #348;
  void (string cmdname)                                                 registercmd = #352;
 +void(float usecursor)                                                 setcursormode = #343;
  vector ()                                                             getmousepos = #344;
  
  string (string s)                                                     uncolorstring = #170;
@@@ -4989,12 -5096,9 +5096,14 @@@ void HUD_Main (void
                        HUD_Panel_UpdatePosSizeForId(highlightedPanel);
                        HUD_Panel_HlBorder(panel_bg_border + 1.5 * hlBorderSize, '0 0.5 1', 0.25 * (1 - autocvar__menu_alpha));
                }
                if (!hud_configure_prev)
++              {
 +                      setcursormode(1);
+                       hudShiftState = 0;
++              }
        }
 +      else if (hud_configure_prev)
 +              setcursormode(0);
  
        hud_configure_prev = autocvar__hud_configure;
  
@@@ -627,13 -638,10 +637,17 @@@ float HUD_Panel_InputEvent(float bInput
        if(!autocvar__hud_configure)
                return false;
  
+       // block any input while a menu dialog is fading
+       if(autocvar__menu_alpha)
+               return true;
 +      if(bInputType == 3)
 +      {
 +              mousepos_x = nPrimary;
 +              mousepos_y = nSecondary;
 +              return true;
 +      }
 +
        // allow console bind to work
        string con_keys;
        float keys;
@@@ -1052,15 -1060,17 +1066,12 @@@ void HUD_Panel_Mouse(
        /*
        print("menu_enabled: ", ftos(menu_enabled), "\n");
        print("Highlighted: ", ftos(highlightedPanel), "\n");
-       print("Menu alpha: ", ftos(autocvar__menu_alpha), "\n");
+       print("Menu theAlpha: ", ftos(autocvar__menu_alpha), "\n");
        */
  
-       // instantly hide the editor cursor if we open the HUDExit dialog
-       // as hud_fade_alpha doesn't decrease to 0 in this case
-       // TODO: find a way to fade the cursor out even in this case
-       if(menu_enabled == 1 || (menu_enabled == 2 && !hud_fade_alpha))
+       if(autocvar__menu_alpha == 1)
                return;
  
 -      mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
 -
 -      mousepos_x = bound(0, mousepos_x, vid_conwidth);
 -      mousepos_y = bound(0, mousepos_y, vid_conheight);
 -
        if(mouseClicked)
        {
                if(prevMouseClicked == 0)