]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_porto.qc
make weapon death messages translatable
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_porto.qc
index fc7fde3fb8d0e623991cfb4c95df67d6f389e9d2..4e9a2cd706d91b359c60f37dd0e92f079add2162 100644 (file)
@@ -1,5 +1,5 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(PORTO, w_porto, 0, 0, WEP_TYPE_OTHER, 0, "porto" , "porto", "Port-O-Launch");
+REGISTER_WEAPON(PORTO, w_porto, 0, 0, WEP_TYPE_OTHER, 0, "porto" , "porto", _("Port-O-Launch"))
 #else
 #ifdef SVQC
 .entity porto_current;
@@ -180,13 +180,13 @@ void W_Porto_Attack (void)
        setorigin(gren, w_shotorg);
        setsize(gren, '0 0 0', '0 0 0');
 
-       gren.nextthink = time + cvar("g_balance_porto_primary_lifetime");
+       gren.nextthink = time + autocvar_g_balance_porto_primary_lifetime;
        gren.think = W_Porto_Think;
        gren.touch = W_Porto_Touch;
        if(self.items & IT_STRENGTH)
-               W_SetupProjectileVelocity(gren, cvar("g_balance_porto_primary_speed") * cvar("g_balance_powerup_strength_force"), 0);
+               W_SetupProjectileVelocity(gren, autocvar_g_balance_porto_primary_speed * autocvar_g_balance_powerup_strength_force, 0);
        else
-               W_SetupProjectileVelocity(gren, cvar("g_balance_porto_primary_speed"), 0);
+               W_SetupProjectileVelocity(gren, autocvar_g_balance_porto_primary_speed, 0);
 
        gren.angles = vectoangles (gren.velocity);
        gren.flags = FL_PROJECTILE;
@@ -219,7 +219,7 @@ float w_porto(float req)
        {
                self.BUTTON_ATCK = FALSE;
                self.BUTTON_ATCK2 = FALSE;
-               if(bot_aim(cvar("g_balance_porto_primary_speed"), 0, cvar("g_balance_grenadelauncher_primary_lifetime"), FALSE))
+               if(bot_aim(autocvar_g_balance_porto_primary_speed, 0, autocvar_g_balance_grenadelauncher_primary_lifetime, FALSE))
                        self.BUTTON_ATCK = TRUE;
        }
        else if (req == WR_THINK)
@@ -250,10 +250,10 @@ float w_porto(float req)
                if (self.BUTTON_ATCK)
                if (!self.porto_current)
                if (!self.porto_forbidden)
-               if (weapon_prepareattack(0, cvar("g_balance_porto_primary_refire")))
+               if (weapon_prepareattack(0, autocvar_g_balance_porto_primary_refire))
                {
                        W_Porto_Attack();
-                       weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_porto_primary_animtime"), w_ready);
+                       weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_porto_primary_animtime, w_ready);
                }
        }
        else if (req == WR_PRECACHE)
@@ -290,9 +290,9 @@ float w_porto(float req)
                // nothing to do
        }
        else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "%s did the impossible";
+               w_deathtypestring = _("%s did the impossible");
        else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = "%s felt %s doing the impossible to him";
+               w_deathtypestring = _("%s felt %s doing the impossible to him");
        return TRUE;
 }
 #endif