]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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
index b64fe3660946dbdead13ac4d1f0a7289feba20d6,f1112b33aa47fbb574dea670058a1ef191dca75c..383f957a815c43339fef982f2787516eec225ce6
@@@ -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
        {
index dd7b18da39321fa124d60816499ee949ff652a4c,15e62170bab859eca1b47c9bfa99797e959b006c..0fabb0d0c70b5eb86d9edca2d752efd2e466ee3e
@@@ -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;
index f8e68fc2badf49f49d24d94ad51603510f556f13,04f3020cb1e4ff325e63461a4e406940ab8d2465..87b07370493992d51f47f971d14dfc36cb196a17
@@@ -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;
  
index 0c47ffa2d73e9f56b0ef1aa3b042b9a9eb47c797,15b924dd9cb9f6eae222bad1524642f001f52003..d5e84f5277cb0d26c216d590c0406c87c4172cee
@@@ -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)