]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove "Spam" from translatable strings for real by sharing g_waypointsprite_spam...
authorterencehill <piuntn@gmail.com>
Sun, 11 Feb 2018 11:39:46 +0000 (12:39 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 11 Feb 2018 11:39:46 +0000 (12:39 +0100)
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/turrets/cl_turrets.qc

index 0c336c0abdce3cb922de945c46263f9cbce7d641..7b3d2abb61287228e15156b129df5cb8f9521153 100644 (file)
@@ -249,6 +249,8 @@ vector spritelookupcolor(entity this, string s, vector def)
 
 string spritelookuptext(entity this, string s)
 {
 
 string spritelookuptext(entity this, string s)
 {
+       if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
+               return "Spam"; // no need to translate this debug string
     if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
     if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_name;
     if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint;
     if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
     if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_name;
     if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint;
@@ -699,10 +701,7 @@ void Draw_WaypointSprite(entity this)
     string txt = string_null;
     if (is_text)
     {
     string txt = string_null;
     if (is_text)
     {
-        if (autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
-            txt = "Spam"; // no need to translate this debug string
-        else
-            txt = spritelookuptext(this, spriteimage);
+        txt = spritelookuptext(this, spriteimage);
         if (this.helpme && time < this.helpme)
             txt = sprintf(_("%s needing help!"), txt);
         if (autocvar_g_waypointsprite_uppercase)
         if (this.helpme && time < this.helpme)
             txt = sprintf(_("%s needing help!"), txt);
         if (autocvar_g_waypointsprite_uppercase)
index 850dd0ceb124835b050d0e2dd0cf303b79ab4985..a57719b82c070a14870f57fba365c55f7bebf6fa 100644 (file)
@@ -115,11 +115,7 @@ void turret_draw2d(entity this)
                LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
        }
 
                LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
        }
 
-       txt = this.netname;
-       if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
-               txt = _("Spam");
-       else
-               txt = spritelookuptext(this, spriteimage);
+       txt = spritelookuptext(this, spriteimage);
 
        if(time - floor(time) > 0.5 && t == this.team)
        {
 
        if(time - floor(time) > 0.5 && t == this.team)
        {