]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Replace usages of mod() with the operator %
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 7359468e0969d236738b619a367e8fa8c8553d7f..28f095487b6a8252191eaf83fa3f39bfa0942a3b 100644 (file)
@@ -3118,7 +3118,7 @@ void HUD_Mod_NexBall(vector pos, vector mySize)
        //Manage the progress bar if any
        if (nb_pb_starttime > 0)
        {
-               dt = mod(time - nb_pb_starttime, nb_pb_period);
+               dt = (time - nb_pb_starttime) % nb_pb_period;
                // one period of positive triangle
                p = 2 * dt / nb_pb_period;
                if (p > 1)
@@ -3762,7 +3762,7 @@ void HUD_InfoMessages(void)
                }
 
                string blinkcolor;
-               if(mod(time, 1) >= 0.5)
+               if(time % 1 >= 0.5)
                        blinkcolor = "^1";
                else
                        blinkcolor = "^3";
@@ -4563,7 +4563,7 @@ void HUD_Main (void)
                        }
                        else if(hud_dock_color == "pants") {
                                f = stof(getplayerkeyvalue(current_player - 1, "colors"));
-                               color = colormapPaletteColor(mod(f, 16), 1);
+                               color = colormapPaletteColor(f % 16, 1);
                        }
                        else
                                color = stov(hud_dock_color);