]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'terencehill/dynamic_hud' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 4ddfee12f96ff7f95a32b90c03fb7cd29167c584..dadb8d41d95378b78c6891caa6aeb2af93551fb6 100644 (file)
@@ -752,8 +752,6 @@ bool WantEventchase(entity this)
                        return true;
                if(MUTATOR_CALLHOOK(WantEventchase, this))
                        return true;
-               if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WEPSET(NEXBALL)))
-                       return true;
                if(autocvar_cl_eventchase_death && (STAT(HEALTH) <= 0))
                {
                        if(autocvar_cl_eventchase_death == 2)
@@ -933,9 +931,8 @@ LABEL(normalcolor)
        return wcross_color;
 }
 
-void HUD_Crosshair()
-{SELFPARAM();
-       entity e = this;
+void HUD_Crosshair(entity this)
+{
        float f, i, j;
        vector v;
        if(!scoreboard_active && !camera_active && intermission != 2 &&
@@ -992,6 +989,7 @@ void HUD_Crosshair()
                string wcross_name = "";
                float wcross_scale, wcross_blur;
 
+        entity e = this; // wtf?
                if(autocvar_crosshair_per_weapon || (autocvar_crosshair_color_special == 1))
                {
                        e = switchingweapon;
@@ -1318,7 +1316,7 @@ void HUD_Crosshair()
        }
 }
 
-void HUD_Draw()
+void HUD_Draw(entity this)
 {
        if(!intermission)
        if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
@@ -1354,7 +1352,7 @@ void HUD_Draw()
 
        // crosshair goes VERY LAST
        UpdateDamage();
-       HUD_Crosshair();
+       HUD_Crosshair(this);
        HitSound();
 }
 
@@ -1372,7 +1370,8 @@ int lasthud;
 float vh_notice_time;
 void WaypointSprite_Load();
 void CSQC_UpdateView(float w, float h)
-{SELFPARAM();
+{
+    SELFPARAM();
     TC(int, w); TC(int, h);
        entity e;
        float fov;
@@ -1407,7 +1406,7 @@ void CSQC_UpdateView(float w, float h)
                view_quality = 1;
 
        // this needs to be updated manually now due to the destruction of engine physics stats
-       if(autocvar_slowmo != STAT(MOVEVARS_TIMESCALE))
+       if(!isdemo() && autocvar_slowmo != STAT(MOVEVARS_TIMESCALE))
                cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE)));
 
        button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this);
@@ -2185,7 +2184,7 @@ void CSQC_UpdateView(float w, float h)
 
        scoreboard_active = HUD_WouldDrawScoreboard();
 
-       HUD_Draw();
+       HUD_Draw(this);
 
        if(NextFrameCommand)
        {