#ifdef REGISTER_WEAPON
-REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "sniperrifle", "Sniper Rifle");
+REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "sniperrifle", _("Sniper Rifle"))
#else
#ifdef SVQC
//Sniper rifle Primary mode: manually operated bolt*, Secondary: full automatic**
{
if(self.sniperrifle_bulletcounter < 0) // forced reload (e.g. because interrupted)
{
- if(self.switchweapon == self.weapon)
- if(self.weaponentity.state == WS_READY)
- W_SniperRifle_Reload();
+ self.wish_reload = 1;
}
else
{
{
if (autocvar_g_balance_sniperrifle_secondary)
{
- if (weapon_prepareattack_check(1, autocvar_g_balance_sniperrifle_secondary_refire))
- if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_secondary_burstcost)
- {
- weapon_prepareattack_do(1, autocvar_g_balance_sniperrifle_secondary_refire);
- W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_secondary_bullethail, W_SniperRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_sniperrifle_secondary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
- self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_secondary_burstcost;
- }
+ if(autocvar_g_balance_sniperrifle_secondary_reload)
+ self.wish_reload = 1;
+ else
+ {
+ if (weapon_prepareattack_check(1, autocvar_g_balance_sniperrifle_secondary_refire))
+ if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_secondary_burstcost)
+ {
+ weapon_prepareattack_do(1, autocvar_g_balance_sniperrifle_secondary_refire);
+ W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_secondary_bullethail, W_SniperRifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_sniperrifle_secondary_animtime, autocvar_g_balance_sniperrifle_primary_refire);
+ self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_secondary_burstcost;
+ }
+ }
}
}
}
+ if(self.wish_reload)
+ {
+ if(self.switchweapon == self.weapon)
+ {
+ if(self.weaponentity.state == WS_READY)
+ {
+ self.wish_reload = 0;
+ W_SniperRifle_Reload();
+ }
+ }
+ }
}
else if (req == WR_PRECACHE)
{
return self.ammo_nails >= autocvar_g_balance_sniperrifle_secondary_ammo;
else if (req == WR_RELOAD)
{
- W_SniperRifle_Reload();
+ self.wish_reload = 1;
}
else if (req == WR_RESETPLAYER)
{
else if (req == WR_SUICIDEMESSAGE)
{
if(w_deathtype & HITTYPE_SECONDARY)
- w_deathtypestring = "%s shot themself automatically";
+ w_deathtypestring = _("%s shot themself automatically");
else
- w_deathtypestring = "%s sniped themself somehow";
+ w_deathtypestring = _("%s sniped themself somehow");
}
else if (req == WR_KILLMESSAGE)
{
if(w_deathtype & HITTYPE_SECONDARY)
{
if(w_deathtype & HITTYPE_BOUNCE)
- w_deathtypestring = "%s failed to hide from %s's bullet hail";
+ w_deathtypestring = _("%s failed to hide from %s's bullet hail");
else
- w_deathtypestring = "%s died in %s's bullet hail";
+ w_deathtypestring = _("%s died in %s's bullet hail");
}
else
{
if(w_deathtype & HITTYPE_BOUNCE)
{
// TODO special headshot message here too?
- w_deathtypestring = "%s failed to hide from %s's rifle";
+ w_deathtypestring = _("%s failed to hide from %s's rifle");
}
else
{
if(w_deathtype & HITTYPE_HEADSHOT)
- w_deathtypestring = "%s got hit in the head by %s";
+ w_deathtypestring = _("%s got hit in the head by %s");
else
- w_deathtypestring = "%s was sniped by %s";
+ w_deathtypestring = _("%s was sniped by %s");
}
}
}