]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/physics.qc
pow(a, b) -> a ** b
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / physics.qc
index 5fc8c1ca9018cba6b656bf6628d4c59a9edd59bc..42f6512c0fc22bfa2d270c6fbdf6aa7e59bebf15 100644 (file)
@@ -4,7 +4,7 @@
 #include <common/mapinfo.qh>
 #include <lib/csqcmodel/cl_player.qh>
 
-// Physics panel (#15)
+// Physics (#15)
 
 vector acc_prevspeed;
 float acc_prevtime, acc_avg, top_speed, top_speed_time;
@@ -18,7 +18,7 @@ void HUD_Physics()
                if(autocvar_hud_panel_physics == 3 && !(gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS)) return;
        }
 
-       HUD_Panel_UpdateCvars();
+       HUD_Panel_LoadCvars();
 
        draw_beginBoldFont();
 
@@ -26,7 +26,7 @@ void HUD_Physics()
                HUD_Scale_Enable();
        else
                HUD_Scale_Disable();
-       HUD_Panel_DrawBg(1);
+       HUD_Panel_DrawBg();
        if(panel_bg_padding)
        {
                panel_pos += '1 1 0' * panel_bg_padding;
@@ -86,7 +86,7 @@ void HUD_Physics()
        if(time > physics_update_time)
        {
                // workaround for ftos_decimals returning a negative 0
-               if(discrete_acceleration > -1 / pow(10, acc_decimals) && discrete_acceleration < 0)
+               if(discrete_acceleration > -1 / (10 ** acc_decimals) && discrete_acceleration < 0)
                        discrete_acceleration = 0;
                discrete_acceleration = acceleration;
                discrete_speed = speed;