]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
authorSamual Lenks <samual@xonotic.org>
Wed, 30 Jan 2013 05:20:06 +0000 (00:20 -0500)
committerSamual Lenks <samual@xonotic.org>
Wed, 30 Jan 2013 05:20:06 +0000 (00:20 -0500)
1  2 
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

diff --combined qcsrc/client/Main.qc
index 30cadd5cf0bdeefeff29af3e9d2a2d9219d12729,3e5deb104d6674735d53bae5e40b618cb6dcbcf6..7b300dd508e5f9d688c91511a1025e4349a1af52
@@@ -149,14 -149,12 +149,14 @@@ void CSQC_Init(void
        teams = Sort_Spawn();
        players = Sort_Spawn();
  
 -      GetTeam(COLOR_SPECTATOR, true); // add specs first
 +      GetTeam(FL_SPECTATOR, true); // add specs first
  
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
 -
 +      CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
 +      CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
 +      
        WaypointSprite_Load();
  
        // precaches
@@@ -262,16 -260,16 +262,16 @@@ float SetTeam(entity o, float Team
                switch(Team)
                {
                        case -1:
 -                      case COLOR_TEAM1:
 -                      case COLOR_TEAM2:
 -                      case COLOR_TEAM3:
 -                      case COLOR_TEAM4:
 +                      case FL_TEAM_1:
 +                      case FL_TEAM_2:
 +                      case FL_TEAM_3:
 +                      case FL_TEAM_4:
                                break;
                        default:
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
 -                                      Team = COLOR_SPECTATOR;
 +                                      Team = FL_SPECTATOR;
                                }
                                break;
                }
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
 -                                      Team = COLOR_SPECTATOR;
 +                                      Team = FL_SPECTATOR;
                                }
                                break;
                }
@@@ -1225,10 -1223,6 +1225,10 @@@ float CSQC_Parse_TempEntity(
                        cl_notice_read();
                        bHandled = true;
                        break;
 +              case TE_CSQC_NOTIFICATION:
 +                      Read_Notification();
 +                      bHandled = true;
 +                      break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;
@@@ -1261,7 -1255,8 +1261,8 @@@ string getcommandkey(string text, strin
                                        keys = strcat(keys, ", ", keynumtostring(k));
  
                                ++l;
-                               if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit >= l) break;
+                               if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit <= l)
+                                       break;
                        }
  
                }
diff --combined qcsrc/client/View.qc
index dccee35de1559ccf42e6773ee2be22b0f564c98a,d1c10405805f93f4135b3abba6bde4391ee968c2..29bf68e2594b724d4d20b5b36f105c9fb0616944
@@@ -242,7 -242,7 +242,7 @@@ float EnemyHitCheck(
        if(teamplay)
                if(t == myteam)
                        return SHOTTYPE_HITTEAM;
 -      if(t == COLOR_SPECTATOR)
 +      if(t == FL_SPECTATOR)
                return SHOTTYPE_HITWORLD;
        return SHOTTYPE_HITENEMY;
  }
@@@ -392,6 -392,13 +392,13 @@@ void CSQC_UpdateView(float w, float h
  
        hud = getstati(STAT_HUD);
  
+       if(autocvar__hud_showbinds_reload) // menu can set this one
+       {
+               db_close(binddb);
+               binddb = db_create();
+               cvar_set("_hud_showbinds_reload", "0");
+       }
        if(checkextension("DP_CSQC_MINFPS_QUALITY"))
                view_quality = getproperty(VF_MINFPS_QUALITY);
        else
index 387cf44c5dd2d129c41d395010f3035cabfe5c37,94cd1a5c03bb4b03450aa61a3facea5e0e874145..07f2b8f787375bb1669d9fbfce672c85a14944c2
@@@ -251,6 -251,7 +251,6 @@@ float autocvar_hud_panel_notify
  float autocvar_hud_panel_notify_fadetime;
  float autocvar_hud_panel_notify_flip;
  float autocvar_hud_panel_notify_fontsize;
 -float autocvar_hud_panel_notify_print;
  float autocvar_hud_panel_notify_time;
  float autocvar_hud_panel_physics;
  float autocvar_hud_panel_physics_acceleration_progressbar_mode;
@@@ -325,6 -326,7 +325,7 @@@ var float autocvar_hud_panel_weapons_ti
  float autocvar_hud_progressbar_alpha;
  float autocvar_hud_showbinds;
  float autocvar_hud_showbinds_limit;
+ float autocvar__hud_showbinds_reload;
  float autocvar_hud_shownames;
  float autocvar_hud_shownames_enemies;
  float autocvar_hud_shownames_crosshairdistance;