From: Rudolf Polzer Date: Tue, 24 May 2011 12:29:16 +0000 (+0200) Subject: rename the sniper rifle to just a rifle. X-Git-Tag: xonotic-v0.5.0~220^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a36e826e580587d3ec8ae4e106cdf10620ad2af1;p=xonotic%2Fxonotic-data.pk3dir.git rename the sniper rifle to just a rifle. If we ever want to rename it again, we then just need to change the visible name. --- diff --git a/balance25.cfg b/balance25.cfg index ea66cd177..e48e20933 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" -set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" +set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" @@ -649,40 +649,40 @@ set g_balance_hlac_secondary_shots 6 set g_balance_hlac_reload_ammo 0 //default: 20 set g_balance_hlac_reload_time 2 // }}} -// {{{ sniperrifle -set g_balance_sniperrifle_bursttime 0 -set g_balance_sniperrifle_primary_tracer 0 -set g_balance_sniperrifle_primary_shots 1 -set g_balance_sniperrifle_primary_damage 60 -set g_balance_sniperrifle_primary_headshotaddeddamage 100 -set g_balance_sniperrifle_primary_spread 0 -set g_balance_sniperrifle_primary_force 2 -set g_balance_sniperrifle_primary_speed 35000 -set g_balance_sniperrifle_primary_lifetime 5 -set g_balance_sniperrifle_primary_refire 0.8 -set g_balance_sniperrifle_primary_animtime 0.3 -set g_balance_sniperrifle_primary_ammo 10 -set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu -set g_balance_sniperrifle_primary_burstcost 0 -set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_secondary 1 -set g_balance_sniperrifle_secondary_reload 0 -set g_balance_sniperrifle_secondary_tracer 0 -set g_balance_sniperrifle_secondary_shots 1 -set g_balance_sniperrifle_secondary_damage 35 -set g_balance_sniperrifle_secondary_headshotaddeddamage 15 // 50 damage only on head -set g_balance_sniperrifle_secondary_spread 0.008 -set g_balance_sniperrifle_secondary_force 1 -set g_balance_sniperrifle_secondary_speed 20000 -set g_balance_sniperrifle_secondary_lifetime 5 -set g_balance_sniperrifle_secondary_refire 0.15 -set g_balance_sniperrifle_secondary_animtime 0.1 -set g_balance_sniperrifle_secondary_ammo 10 -set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu -set g_balance_sniperrifle_secondary_burstcost 0 -set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_reload_ammo 80 //default: 80 -set g_balance_sniperrifle_reload_time 2 +// {{{ rifle +set g_balance_rifle_bursttime 0 +set g_balance_rifle_primary_tracer 0 +set g_balance_rifle_primary_shots 1 +set g_balance_rifle_primary_damage 60 +set g_balance_rifle_primary_headshotaddeddamage 100 +set g_balance_rifle_primary_spread 0 +set g_balance_rifle_primary_force 2 +set g_balance_rifle_primary_speed 35000 +set g_balance_rifle_primary_lifetime 5 +set g_balance_rifle_primary_refire 0.8 +set g_balance_rifle_primary_animtime 0.3 +set g_balance_rifle_primary_ammo 10 +set g_balance_rifle_primary_bulletconstant 130 // 56.3qu +set g_balance_rifle_primary_burstcost 0 +set g_balance_rifle_primary_bullethail 0 // empty magazine on shot +set g_balance_rifle_secondary 1 +set g_balance_rifle_secondary_reload 0 +set g_balance_rifle_secondary_tracer 0 +set g_balance_rifle_secondary_shots 1 +set g_balance_rifle_secondary_damage 35 +set g_balance_rifle_secondary_headshotaddeddamage 15 // 50 damage only on head +set g_balance_rifle_secondary_spread 0.008 +set g_balance_rifle_secondary_force 1 +set g_balance_rifle_secondary_speed 20000 +set g_balance_rifle_secondary_lifetime 5 +set g_balance_rifle_secondary_refire 0.15 +set g_balance_rifle_secondary_animtime 0.1 +set g_balance_rifle_secondary_ammo 10 +set g_balance_rifle_secondary_bulletconstant 130 // 18.3qu +set g_balance_rifle_secondary_burstcost 0 +set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot +set g_balance_rifle_reload_ammo 80 //default: 80 +set g_balance_rifle_reload_time 2 // }}} // {{{ tuba set g_balance_tuba_refire 0.05 diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg index bd72a7071..2237ef53e 100644 --- a/balanceLeeStricklin.cfg +++ b/balanceLeeStricklin.cfg @@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hlac 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" -set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" +set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" @@ -649,40 +649,40 @@ set g_balance_hlac_secondary_shots 6 set g_balance_hlac_reload_ammo 0 //default: 20 set g_balance_hlac_reload_time 2 // }}} -// {{{ sniperrifle -set g_balance_sniperrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries -set g_balance_sniperrifle_primary_tracer 0 -set g_balance_sniperrifle_primary_shots 1 -set g_balance_sniperrifle_primary_damage 75 -set g_balance_sniperrifle_primary_headshotaddeddamage 90 -set g_balance_sniperrifle_primary_spread 0 -set g_balance_sniperrifle_primary_force 2 -set g_balance_sniperrifle_primary_speed 35000 -set g_balance_sniperrifle_primary_lifetime 5 -set g_balance_sniperrifle_primary_refire 0.7 -set g_balance_sniperrifle_primary_animtime 0.3 -set g_balance_sniperrifle_primary_ammo 10 -set g_balance_sniperrifle_primary_bulletconstant 130 // 56.3qu -set g_balance_sniperrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time -set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_secondary 1 -set g_balance_sniperrifle_secondary_reload 0 -set g_balance_sniperrifle_secondary_tracer 0 -set g_balance_sniperrifle_secondary_shots 1 -set g_balance_sniperrifle_secondary_damage 40 -set g_balance_sniperrifle_secondary_headshotaddeddamage 20 -set g_balance_sniperrifle_secondary_spread 0.008 -set g_balance_sniperrifle_secondary_force 1 -set g_balance_sniperrifle_secondary_speed 20000 -set g_balance_sniperrifle_secondary_lifetime 5 -set g_balance_sniperrifle_secondary_refire 0.0006 -set g_balance_sniperrifle_secondary_animtime 0.1 -set g_balance_sniperrifle_secondary_ammo 10 -set g_balance_sniperrifle_secondary_bulletconstant 130 // 18.3qu -set g_balance_sniperrifle_secondary_burstcost 0 -set g_balance_sniperrifle_secondary_bullethail 0 -set g_balance_sniperrifle_reload_ammo 80 //default: 80 -set g_balance_sniperrifle_reload_time 2 +// {{{ rifle +set g_balance_rifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries +set g_balance_rifle_primary_tracer 0 +set g_balance_rifle_primary_shots 1 +set g_balance_rifle_primary_damage 75 +set g_balance_rifle_primary_headshotaddeddamage 90 +set g_balance_rifle_primary_spread 0 +set g_balance_rifle_primary_force 2 +set g_balance_rifle_primary_speed 35000 +set g_balance_rifle_primary_lifetime 5 +set g_balance_rifle_primary_refire 0.7 +set g_balance_rifle_primary_animtime 0.3 +set g_balance_rifle_primary_ammo 10 +set g_balance_rifle_primary_bulletconstant 130 // 56.3qu +set g_balance_rifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time +set g_balance_rifle_primary_bullethail 0 // empty magazine on shot +set g_balance_rifle_secondary 1 +set g_balance_rifle_secondary_reload 0 +set g_balance_rifle_secondary_tracer 0 +set g_balance_rifle_secondary_shots 1 +set g_balance_rifle_secondary_damage 40 +set g_balance_rifle_secondary_headshotaddeddamage 20 +set g_balance_rifle_secondary_spread 0.008 +set g_balance_rifle_secondary_force 1 +set g_balance_rifle_secondary_speed 20000 +set g_balance_rifle_secondary_lifetime 5 +set g_balance_rifle_secondary_refire 0.0006 +set g_balance_rifle_secondary_animtime 0.1 +set g_balance_rifle_secondary_ammo 10 +set g_balance_rifle_secondary_bulletconstant 130 // 18.3qu +set g_balance_rifle_secondary_burstcost 0 +set g_balance_rifle_secondary_bullethail 0 +set g_balance_rifle_reload_ammo 80 //default: 80 +set g_balance_rifle_reload_time 2 // }}} // {{{ tuba set g_balance_tuba_refire 0.05 diff --git a/balanceSamual.cfg b/balanceSamual.cfg index 5929b35b0..a8719766f 100644 --- a/balanceSamual.cfg +++ b/balanceSamual.cfg @@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE -set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE +set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" // UNTIL IT CAN BE REMOVED FROM CODE set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" @@ -649,40 +649,40 @@ set g_balance_hlac_secondary_shots 6 set g_balance_hlac_reload_ammo 0 //default: 20 set g_balance_hlac_reload_time 2 // }}} -// {{{ sniperrifle -set g_balance_sniperrifle_bursttime 0 -set g_balance_sniperrifle_primary_tracer 1 -set g_balance_sniperrifle_primary_shots 1 -set g_balance_sniperrifle_primary_damage 30 -set g_balance_sniperrifle_primary_headshotaddeddamage 30 -set g_balance_sniperrifle_primary_spread 0 -set g_balance_sniperrifle_primary_force 100 -set g_balance_sniperrifle_primary_speed 40000 -set g_balance_sniperrifle_primary_lifetime 5 -set g_balance_sniperrifle_primary_refire 1.2 -set g_balance_sniperrifle_primary_animtime 0.4 -set g_balance_sniperrifle_primary_ammo 10 -set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu -set g_balance_sniperrifle_primary_burstcost 0 -set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_secondary 1 -set g_balance_sniperrifle_secondary_reload 0 -set g_balance_sniperrifle_secondary_tracer 0 -set g_balance_sniperrifle_secondary_shots 4 -set g_balance_sniperrifle_secondary_damage 10 -set g_balance_sniperrifle_secondary_headshotaddeddamage 10 -set g_balance_sniperrifle_secondary_spread 0.02 -set g_balance_sniperrifle_secondary_force 50 -set g_balance_sniperrifle_secondary_speed 20000 -set g_balance_sniperrifle_secondary_lifetime 5 -set g_balance_sniperrifle_secondary_refire 0.9 -set g_balance_sniperrifle_secondary_animtime 0.3 -set g_balance_sniperrifle_secondary_ammo 10 -set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu -set g_balance_sniperrifle_secondary_burstcost 0 -set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_reload_ammo 80 //default: 80 -set g_balance_sniperrifle_reload_time 2 +// {{{ rifle +set g_balance_rifle_bursttime 0 +set g_balance_rifle_primary_tracer 1 +set g_balance_rifle_primary_shots 1 +set g_balance_rifle_primary_damage 30 +set g_balance_rifle_primary_headshotaddeddamage 30 +set g_balance_rifle_primary_spread 0 +set g_balance_rifle_primary_force 100 +set g_balance_rifle_primary_speed 40000 +set g_balance_rifle_primary_lifetime 5 +set g_balance_rifle_primary_refire 1.2 +set g_balance_rifle_primary_animtime 0.4 +set g_balance_rifle_primary_ammo 10 +set g_balance_rifle_primary_bulletconstant 110 // 62.2qu +set g_balance_rifle_primary_burstcost 0 +set g_balance_rifle_primary_bullethail 0 // empty magazine on shot +set g_balance_rifle_secondary 1 +set g_balance_rifle_secondary_reload 0 +set g_balance_rifle_secondary_tracer 0 +set g_balance_rifle_secondary_shots 4 +set g_balance_rifle_secondary_damage 10 +set g_balance_rifle_secondary_headshotaddeddamage 10 +set g_balance_rifle_secondary_spread 0.02 +set g_balance_rifle_secondary_force 50 +set g_balance_rifle_secondary_speed 20000 +set g_balance_rifle_secondary_lifetime 5 +set g_balance_rifle_secondary_refire 0.9 +set g_balance_rifle_secondary_animtime 0.3 +set g_balance_rifle_secondary_ammo 10 +set g_balance_rifle_secondary_bulletconstant 110 // 15.5qu +set g_balance_rifle_secondary_burstcost 0 +set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot +set g_balance_rifle_reload_ammo 80 //default: 80 +set g_balance_rifle_reload_time 2 // }}} // {{{ tuba set g_balance_tuba_refire 0.05 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 5bffd7df9..7256633ac 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" -set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" +set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" @@ -649,40 +649,40 @@ set g_balance_hlac_secondary_shots 6 set g_balance_hlac_reload_ammo 0 //default: 20 set g_balance_hlac_reload_time 2 // }}} -// {{{ sniperrifle -set g_balance_sniperrifle_bursttime 0 -set g_balance_sniperrifle_primary_tracer 1 -set g_balance_sniperrifle_primary_shots 1 -set g_balance_sniperrifle_primary_damage 60 -set g_balance_sniperrifle_primary_headshotaddeddamage 60 -set g_balance_sniperrifle_primary_spread 0 -set g_balance_sniperrifle_primary_force 2 -set g_balance_sniperrifle_primary_speed 40000 -set g_balance_sniperrifle_primary_lifetime 5 -set g_balance_sniperrifle_primary_refire 1.5 -set g_balance_sniperrifle_primary_animtime 1.4 -set g_balance_sniperrifle_primary_ammo 10 -set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu -set g_balance_sniperrifle_primary_burstcost 0 -set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_secondary 1 -set g_balance_sniperrifle_secondary_reload 1 -set g_balance_sniperrifle_secondary_tracer 0 -set g_balance_sniperrifle_secondary_shots 1 -set g_balance_sniperrifle_secondary_damage 42 -set g_balance_sniperrifle_secondary_headshotaddeddamage 42 -set g_balance_sniperrifle_secondary_spread 0 -set g_balance_sniperrifle_secondary_force 2 -set g_balance_sniperrifle_secondary_speed 20000 -set g_balance_sniperrifle_secondary_lifetime 5 -set g_balance_sniperrifle_secondary_refire 1.5 -set g_balance_sniperrifle_secondary_animtime 1.4 -set g_balance_sniperrifle_secondary_ammo 10 -set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu -set g_balance_sniperrifle_secondary_burstcost 0 -set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_reload_ammo 80 //default: 80 -set g_balance_sniperrifle_reload_time 2 +// {{{ rifle +set g_balance_rifle_bursttime 0 +set g_balance_rifle_primary_tracer 1 +set g_balance_rifle_primary_shots 1 +set g_balance_rifle_primary_damage 60 +set g_balance_rifle_primary_headshotaddeddamage 60 +set g_balance_rifle_primary_spread 0 +set g_balance_rifle_primary_force 2 +set g_balance_rifle_primary_speed 40000 +set g_balance_rifle_primary_lifetime 5 +set g_balance_rifle_primary_refire 1.5 +set g_balance_rifle_primary_animtime 1.4 +set g_balance_rifle_primary_ammo 10 +set g_balance_rifle_primary_bulletconstant 110 // 62.2qu +set g_balance_rifle_primary_burstcost 0 +set g_balance_rifle_primary_bullethail 0 // empty magazine on shot +set g_balance_rifle_secondary 1 +set g_balance_rifle_secondary_reload 1 +set g_balance_rifle_secondary_tracer 0 +set g_balance_rifle_secondary_shots 1 +set g_balance_rifle_secondary_damage 42 +set g_balance_rifle_secondary_headshotaddeddamage 42 +set g_balance_rifle_secondary_spread 0 +set g_balance_rifle_secondary_force 2 +set g_balance_rifle_secondary_speed 20000 +set g_balance_rifle_secondary_lifetime 5 +set g_balance_rifle_secondary_refire 1.5 +set g_balance_rifle_secondary_animtime 1.4 +set g_balance_rifle_secondary_ammo 10 +set g_balance_rifle_secondary_bulletconstant 110 // 15.5qu +set g_balance_rifle_secondary_burstcost 0 +set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot +set g_balance_rifle_reload_ammo 80 //default: 80 +set g_balance_rifle_reload_time 2 // }}} // {{{ tuba set g_balance_tuba_refire 0.05 diff --git a/balancetZork.cfg b/balancetZork.cfg index 8a09f03e5..73600d3ee 100644 --- a/balancetZork.cfg +++ b/balancetZork.cfg @@ -13,7 +13,7 @@ set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provid set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" -set g_start_weapon_sniperrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" +set g_start_weapon_rifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms" @@ -648,40 +648,40 @@ set g_balance_hlac_secondary_shots 6 set g_balance_hlac_reload_ammo 0 //default: 20 set g_balance_hlac_reload_time 2 // }}} -// {{{ sniperrifle -set g_balance_sniperrifle_bursttime 0 -set g_balance_sniperrifle_primary_tracer 1 -set g_balance_sniperrifle_primary_shots 1 -set g_balance_sniperrifle_primary_damage 40 -set g_balance_sniperrifle_primary_headshotaddeddamage 100 -set g_balance_sniperrifle_primary_spread 0 -set g_balance_sniperrifle_primary_force 2 -set g_balance_sniperrifle_primary_speed 40000 -set g_balance_sniperrifle_primary_lifetime 5 -set g_balance_sniperrifle_primary_refire 0.65 -set g_balance_sniperrifle_primary_animtime 0.6 -set g_balance_sniperrifle_primary_ammo 10 -set g_balance_sniperrifle_primary_bulletconstant 110 // 62.2qu -set g_balance_sniperrifle_primary_burstcost 0 -set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_secondary 1 -set g_balance_sniperrifle_secondary_reload 0 -set g_balance_sniperrifle_secondary_tracer 0 -set g_balance_sniperrifle_secondary_shots 1 -set g_balance_sniperrifle_secondary_damage 50 -set g_balance_sniperrifle_secondary_headshotaddeddamage 50 // 50 damage only on head -set g_balance_sniperrifle_secondary_spread 0 -set g_balance_sniperrifle_secondary_force 2 -set g_balance_sniperrifle_secondary_speed 20000 -set g_balance_sniperrifle_secondary_lifetime 5 -set g_balance_sniperrifle_secondary_refire 1.5 -set g_balance_sniperrifle_secondary_animtime 0.6 -set g_balance_sniperrifle_secondary_ammo 10 -set g_balance_sniperrifle_secondary_bulletconstant 110 // 15.5qu -set g_balance_sniperrifle_secondary_burstcost 0 -set g_balance_sniperrifle_secondary_bullethail 0 // empty magazine on shot -set g_balance_sniperrifle_reload_ammo 80 //default: 80 -set g_balance_sniperrifle_reload_time 2 +// {{{ rifle +set g_balance_rifle_bursttime 0 +set g_balance_rifle_primary_tracer 1 +set g_balance_rifle_primary_shots 1 +set g_balance_rifle_primary_damage 40 +set g_balance_rifle_primary_headshotaddeddamage 100 +set g_balance_rifle_primary_spread 0 +set g_balance_rifle_primary_force 2 +set g_balance_rifle_primary_speed 40000 +set g_balance_rifle_primary_lifetime 5 +set g_balance_rifle_primary_refire 0.65 +set g_balance_rifle_primary_animtime 0.6 +set g_balance_rifle_primary_ammo 10 +set g_balance_rifle_primary_bulletconstant 110 // 62.2qu +set g_balance_rifle_primary_burstcost 0 +set g_balance_rifle_primary_bullethail 0 // empty magazine on shot +set g_balance_rifle_secondary 1 +set g_balance_rifle_secondary_reload 0 +set g_balance_rifle_secondary_tracer 0 +set g_balance_rifle_secondary_shots 1 +set g_balance_rifle_secondary_damage 50 +set g_balance_rifle_secondary_headshotaddeddamage 50 // 50 damage only on head +set g_balance_rifle_secondary_spread 0 +set g_balance_rifle_secondary_force 2 +set g_balance_rifle_secondary_speed 20000 +set g_balance_rifle_secondary_lifetime 5 +set g_balance_rifle_secondary_refire 1.5 +set g_balance_rifle_secondary_animtime 0.6 +set g_balance_rifle_secondary_ammo 10 +set g_balance_rifle_secondary_bulletconstant 110 // 15.5qu +set g_balance_rifle_secondary_burstcost 0 +set g_balance_rifle_secondary_bullethail 0 // empty magazine on shot +set g_balance_rifle_reload_ammo 80 //default: 80 +set g_balance_rifle_reload_time 2 // }}} // {{{ tuba set g_balance_tuba_refire 0.05 diff --git a/csprogs.dat.de.po b/csprogs.dat.de.po index e0e444952..67f8bee59 100644 --- a/csprogs.dat.de.po +++ b/csprogs.dat.de.po @@ -1708,41 +1708,41 @@ msgstr "%2$1s ^7hat %1$s ^7ein wenig mit einer großen Schrotflinte geschlagen" msgid "%s was gunned by %s" msgstr "^1%s^1 wurde von %s^1 erschossen" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s hat sich vollautomatisch selbst erschossen" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s hat so scharf geschossen, dass er sich selbst getroffen hat" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s hat es nicht geschafft, sich vor %ss Kugelhagel zu verstecken" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s ist in %ss Kugelhagel gefallen" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s hat es nicht geschafft, sich vor %ss Gewehr zu verstecken" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s hat ein Loch im Kopf bekommen; schuld war %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "^1%s^1 wurde von %s^1 erledigt" diff --git a/csprogs.dat.pot b/csprogs.dat.pot index 1f7a47641..be35f05e4 100644 --- a/csprogs.dat.pot +++ b/csprogs.dat.pot @@ -1483,7 +1483,7 @@ msgstr "" msgid "Machine Gun" msgstr "" -#: qcsrc/server/w_uzi.qc:321 qcsrc/server/w_sniperrifle.qc:254 +#: qcsrc/server/w_uzi.qc:321 qcsrc/server/w_rifle.qc:254 #, c-format msgid "%s was sniped by %s" msgstr "" @@ -1493,36 +1493,36 @@ msgstr "" msgid "%s was riddled full of holes by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 553b42f8e..0781bfddb 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -173,10 +173,10 @@ seta crosshair_seeker "" "crosshair to display when wielding the TAG Seeker" seta crosshair_seeker_color "1 0.35 0.35" "crosshair color to display when wielding the TAG seeker" seta crosshair_seeker_alpha 0.9 "crosshair alpha value to display when wielding the TAG seeker" seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker" -seta crosshair_sniperrifle "" "crosshair to display when wielding the sniperrifle" -seta crosshair_sniperrifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the sniperrifle" -seta crosshair_sniperrifle_alpha 1 "crosshair alpha value to display when wielding the sniperrifle" -seta crosshair_sniperrifle_size 0.65 "crosshair size when wielding the sniperrifle" +seta crosshair_rifle "" "crosshair to display when wielding the rifle" +seta crosshair_rifle_color "0.85 0.5 0.25" "crosshair color to display when wielding the rifle" +seta crosshair_rifle_alpha 1 "crosshair alpha value to display when wielding the rifle" +seta crosshair_rifle_size 0.65 "crosshair size when wielding the rifle" seta crosshair_tuba "" "crosshair to display when wielding the tuba" seta crosshair_tuba_color "0.85 0.5 0.25" "crosshair color to display when wielding the tuba" seta crosshair_tuba_alpha 1 "crosshair alpha value to display when wielding the tuba" @@ -449,9 +449,9 @@ set bot_ai_keyboard_threshold 0.57 set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim" set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming" set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons" -set bot_ai_custom_weapon_priority_far "minstanex nex sniperrifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority" -set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi sniperrifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority" -set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro sniperrifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority" +set bot_ai_custom_weapon_priority_far "minstanex nex rifle electro rocketlauncher grenadelauncher hagar hlac crylink laser uzi fireball seeker shotgun tuba minelayer" "Desired weapons for far distances ordered by priority" +set bot_ai_custom_weapon_priority_mid "minstanex rocketlauncher nex fireball seeker grenadelauncher electro uzi rifle crylink hlac hagar shotgun laser tuba minelayer" "Desired weapons for middle distances ordered by priority" +set bot_ai_custom_weapon_priority_close "minstanex shotgun nex uzi hlac tuba seeker hagar crylink grenadelauncher electro rifle rocketlauncher laser fireball minelayer" "Desired weapons for close distances ordered by priority" set bot_ai_weapon_combo 1 "Enable bots to do weapon combos" set bot_ai_weapon_combo_threshold 0.4 "Try to make a combo N seconds after the last attack" set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item" @@ -1677,12 +1677,12 @@ set g_jump_grunt 0 "Do you make a grunting noise every time you jump? Is it the alias allready "sv_cmd allready" -seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher minelayer fireball hlac hagar seeker crylink sniperrifle uzi electro tuba shotgun laser hook porto" "weapon priority list" +seta cl_weaponpriority "minstanex rocketlauncher nex grenadelauncher minelayer fireball hlac hagar seeker crylink rifle uzi electro tuba shotgun laser hook porto" "weapon priority list" seta cl_weaponpriority_useforcycling 0 "when set, weapon cycling by the mouse wheel makes use of the weapon priority list (the special value 2 uses the weapon ID list for cycling)" seta cl_weaponpriority0 "rocketlauncher grenadelauncher hagar seeker fireball" "use impulse 200 for prev gun from this list, 210 for best gun, 220 for next gun. Default value: explosives" seta cl_weaponpriority1 "minstanex nex crylink hlac electro laser" "use impulse 201 for prev gun from this list, 211 for best gun, 221 for next gun. Default value: energy" -seta cl_weaponpriority2 "minstanex nex sniperrifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact" -seta cl_weaponpriority3 "minstanex nex sniperrifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all" +seta cl_weaponpriority2 "minstanex nex rifle" "use impulse 202 for prev gun from this list, 212 for best gun, 222 for next gun. Default value: hitscan exact" +seta cl_weaponpriority3 "minstanex nex rifle uzi shotgun" "use impulse 203 for prev gun from this list, 213 for best gun, 223 for next gun. Default value: hitscan all" seta cl_weaponpriority4 "grenadelauncher minelayer hlac hagar crylink seeker shotgun" "use impulse 204 for prev gun from this list, 214 for best gun, 224 for next gun. Default value: spam weapons" seta cl_weaponpriority5 "laser hook porto" "use impulse 205 for prev gun from this list, 215 for best gun, 225 for next gun. Default value: weapons for moving" seta cl_weaponpriority6 "" "use impulse 206 for prev gun from this list, 216 for best gun, 226 for next gun" @@ -2010,7 +2010,7 @@ set g_weaponreplace_porto "" set g_weaponreplace_minstanex "" set g_weaponreplace_hook "" set g_weaponreplace_hlac "" -set g_weaponreplace_sniperrifle "" +set g_weaponreplace_rifle "" set g_weaponreplace_tuba "" set g_weaponreplace_fireball "" set g_weaponreplace_seeker "" diff --git a/gfx/crosshair_ring_rifle.tga b/gfx/crosshair_ring_rifle.tga new file mode 100644 index 000000000..b25e3509b Binary files /dev/null and b/gfx/crosshair_ring_rifle.tga differ diff --git a/gfx/crosshair_ring_sniperrifle.tga b/gfx/crosshair_ring_sniperrifle.tga deleted file mode 100644 index b25e3509b..000000000 Binary files a/gfx/crosshair_ring_sniperrifle.tga and /dev/null differ diff --git a/gfx/hud/default/weaponrifle.tga b/gfx/hud/default/weaponrifle.tga new file mode 100644 index 000000000..f5c2e5592 Binary files /dev/null and b/gfx/hud/default/weaponrifle.tga differ diff --git a/gfx/hud/default/weaponsniperrifle.tga b/gfx/hud/default/weaponsniperrifle.tga deleted file mode 100644 index f5c2e5592..000000000 Binary files a/gfx/hud/default/weaponsniperrifle.tga and /dev/null differ diff --git a/gfx/hud/luminos/weaponrifle.tga b/gfx/hud/luminos/weaponrifle.tga new file mode 100644 index 000000000..f5c2e5592 Binary files /dev/null and b/gfx/hud/luminos/weaponrifle.tga differ diff --git a/gfx/hud/luminos/weaponsniperrifle.tga b/gfx/hud/luminos/weaponsniperrifle.tga deleted file mode 100644 index f5c2e5592..000000000 Binary files a/gfx/hud/luminos/weaponsniperrifle.tga and /dev/null differ diff --git a/gfx/hud/old/weaponrifle.tga b/gfx/hud/old/weaponrifle.tga new file mode 100644 index 000000000..09da559dc Binary files /dev/null and b/gfx/hud/old/weaponrifle.tga differ diff --git a/gfx/hud/old/weaponsniperrifle.tga b/gfx/hud/old/weaponsniperrifle.tga deleted file mode 100644 index 09da559dc..000000000 Binary files a/gfx/hud/old/weaponsniperrifle.tga and /dev/null differ diff --git a/hook-firing_swap.cfg b/hook-firing_swap.cfg index a24a98c93..4ed138120 100644 --- a/hook-firing_swap.cfg +++ b/hook-firing_swap.cfg @@ -24,7 +24,7 @@ seta cl_swapattacks_minstanex 0 seta cl_swapattacks_hook 0 seta cl_swapattacks_hlac 0 seta cl_swapattacks_tuba 0 -seta cl_swapattacks_sniperrifle 0 +seta cl_swapattacks_rifle 0 seta cl_swapattacks_fireball 0 seta cl_swapattacks_seeker 0 diff --git a/menu.dat.de.po b/menu.dat.de.po index 3239d487d..15fd023e9 100644 --- a/menu.dat.de.po +++ b/menu.dat.de.po @@ -2702,41 +2702,41 @@ msgstr "%2$1s ^7hat %1$s ^7ein wenig mit einer großen Schrotflinte geschlagen" msgid "%s was gunned by %s" msgstr "^1%s^1 wurde von %s^1 erschossen" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s hat sich vollautomatisch selbst erschossen" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s hat so scharf geschossen, dass er sich selbst getroffen hat" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s hat es nicht geschafft, sich vor %ss Kugelhagel zu verstecken" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s ist in %ss Kugelhagel gefallen" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s hat es nicht geschafft, sich vor %ss Gewehr zu verstecken" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s hat ein Loch im Kopf bekommen; schuld war %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "^1%s^1 wurde von %s^1 erledigt" diff --git a/menu.dat.es.po b/menu.dat.es.po index 13c74ff44..bc6031e69 100644 --- a/menu.dat.es.po +++ b/menu.dat.es.po @@ -2769,41 +2769,41 @@ msgstr "%2$s ^7abofeteó %1$s ^7con una gran ^2shotgun" msgid "%s was gunned by %s" msgstr "%s fue tiroteado por %s" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s se disparó a si mismo" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s se disparó a si mismo" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s no logró esconderse del granizo de balas de %s" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s murió en el granizo de balas de %s" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s no logró esconderse del rifle de %s" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s fué disparado en la cabeza por %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "%s fué disparado con un rifle por %s" diff --git a/menu.dat.fi.po b/menu.dat.fi.po index dfa0ceb0e..e51b90a81 100644 --- a/menu.dat.fi.po +++ b/menu.dat.fi.po @@ -2706,41 +2706,41 @@ msgstr "" msgid "%s was gunned by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "" diff --git a/menu.dat.fr.po b/menu.dat.fr.po index 10de09043..1ae75bd9b 100644 --- a/menu.dat.fr.po +++ b/menu.dat.fr.po @@ -2726,41 +2726,41 @@ msgstr "%2$s ^7a baffé %1$s ^7avec un ^2fusil" msgid "%s was gunned by %s" msgstr "%s s'est fait fusiller par %s" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Fusil Sniper" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s s'est suicidé au sniper" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s a oublié le cran de sûreté en chargeant" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s n'a pas pu se cacher de la nuée de balles de %s" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s est mort de la nuée de balles de %s" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s n'a pas réussi à se cacher du sniper de %s" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s s'est fait décapiter au sniper par %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "%s s'est fait descendre au sniper par %s" diff --git a/menu.dat.hu.po b/menu.dat.hu.po index 75096ed81..ad57f3354 100644 --- a/menu.dat.hu.po +++ b/menu.dat.hu.po @@ -2709,41 +2709,41 @@ msgstr "" msgid "%s was gunned by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "" diff --git a/menu.dat.it.po b/menu.dat.it.po index 235569270..c68fb46fe 100644 --- a/menu.dat.it.po +++ b/menu.dat.it.po @@ -2704,41 +2704,41 @@ msgstr "%2$s ^7ha schiaffeggiato %1$s ^7un pò con un grosso ^2shotgun" msgid "%s was gunned by %s" msgstr "%s è stato sparato da %s" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s si è sparato da solo automaticamente" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s si è fucilato da solo in qualche modo" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s non è riuscito a nascondersi dalla raffica di proiettili di %s" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s è morto nella raffica di proiettili di %s" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s non è riuscito a nascondersi dal fucile di %s" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s ha preso un colpo in testa da %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "%s è stato fucilato da %s" diff --git a/menu.dat.nl.po b/menu.dat.nl.po index 66a05ed64..402b8220e 100644 --- a/menu.dat.nl.po +++ b/menu.dat.nl.po @@ -2701,41 +2701,41 @@ msgstr "" msgid "%s was gunned by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "" diff --git a/menu.dat.pot b/menu.dat.pot index 25b8d1942..651a5a380 100644 --- a/menu.dat.pot +++ b/menu.dat.pot @@ -2498,7 +2498,7 @@ msgstr "" msgid "Machine Gun" msgstr "" -#: qcsrc/server/w_uzi.qc:321 qcsrc/server/w_sniperrifle.qc:254 +#: qcsrc/server/w_uzi.qc:321 qcsrc/server/w_rifle.qc:254 #, c-format msgid "%s was sniped by %s" msgstr "" @@ -2508,36 +2508,36 @@ msgstr "" msgid "%s was riddled full of holes by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" diff --git a/menu.dat.pt.po b/menu.dat.pt.po index f1eb38b07..962336ee5 100644 --- a/menu.dat.pt.po +++ b/menu.dat.pt.po @@ -2703,41 +2703,41 @@ msgstr "%2$s ^7maltratou %1$s ^7com uma grande ^2caçadeira" msgid "%s was gunned by %s" msgstr "%s foi atingido por %s" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s disparou em si próprio" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s snipou-se de alguma forma..." -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s não se conseguiu esconder da chuva de balas de %s" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s morreu na chuva de balas de %s" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s não se conseguiu esconder da espingarda de %s" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s foi atingido na cabeça por %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "%s foi snipado por %s" diff --git a/menu.dat.ro.po b/menu.dat.ro.po index acac44b63..c409435a8 100644 --- a/menu.dat.ro.po +++ b/menu.dat.ro.po @@ -2701,41 +2701,41 @@ msgstr "%2$s ^7l-a plesnit pe %1$s ^7cu o ^2Pusca ^7foarte mare" msgid "%s was gunned by %s" msgstr "%s a fost impuscat de %s" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "%s s-a impuscat automat" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "%s s-a impuscat oarecum cu luneta" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "%s nu a reusit sa se ascunda de ploaia de gloante a lui %s" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "%s a murit in ploaia de gloante a lui %s" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "%s nu a reusit sa se ascunda de luneta lui %s" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "%s a fost lovit in cap de %s" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "%s a fost nimerit cu luneta de %s" diff --git a/menu.dat.ru.po b/menu.dat.ru.po index 87021d894..d33db5d0c 100644 --- a/menu.dat.ru.po +++ b/menu.dat.ru.po @@ -2711,41 +2711,41 @@ msgstr "" msgid "%s was gunned by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "Sniper Rifle" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "" diff --git a/menu.dat.se.po b/menu.dat.se.po index ff5d4fde7..19ccdf60b 100644 --- a/menu.dat.se.po +++ b/menu.dat.se.po @@ -2721,41 +2721,41 @@ msgstr "" msgid "%s was gunned by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:2 +#: qcsrc/server/w_rifle.qc:2 msgid "Sniper Rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:229 +#: qcsrc/server/w_rifle.qc:229 #, c-format msgid "%s shot themself automatically" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:231 +#: qcsrc/server/w_rifle.qc:231 #, c-format msgid "%s sniped themself somehow" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:238 +#: qcsrc/server/w_rifle.qc:238 #, c-format msgid "%s failed to hide from %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:240 +#: qcsrc/server/w_rifle.qc:240 #, c-format msgid "%s died in %s's bullet hail" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:247 +#: qcsrc/server/w_rifle.qc:247 #, c-format msgid "%s failed to hide from %s's rifle" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:252 +#: qcsrc/server/w_rifle.qc:252 #, c-format msgid "%s got hit in the head by %s" msgstr "" -#: qcsrc/server/w_sniperrifle.qc:254 qcsrc/server/w_uzi.qc:321 +#: qcsrc/server/w_rifle.qc:254 qcsrc/server/w_uzi.qc:321 #, c-format msgid "%s was sniped by %s" msgstr "" diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index 666fd8823..4ef1d04d6 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -258,7 +258,7 @@ float w_deathtype, w_issilent, w_random; string w_deathtypestring; vector w_org, w_backoff; -float sniperrifle_scope; +float rifle_scope; float nex_scope; float minelayer_maxmines; diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index bac1fdaef..0cc156391 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1095,7 +1095,7 @@ void Ent_Init() g_balance_electro_secondary_bouncestop = ReadCoord(); nex_scope = !ReadByte(); - sniperrifle_scope = !ReadByte(); + rifle_scope = !ReadByte(); serverflags = ReadByte(); diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 029b9460f..c39daf22e 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -137,7 +137,7 @@ vector GetCurrentFov(float fov) zoomspeed = 3.5; zoomdir = button_zoom; - if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_SNIPERRIFLE && sniperrifle_scope)) // do NOT use switchweapon here + if((getstati(STAT_ACTIVEWEAPON) == WEP_NEX && nex_scope) || (getstati(STAT_ACTIVEWEAPON) == WEP_RIFLE && rifle_scope)) // do NOT use switchweapon here zoomdir += button_attack2; if(spectatee_status > 0 || isdemo()) { @@ -274,7 +274,7 @@ float TrueAimCheck() case WEP_MINSTANEX: mv = MOVE_NORMAL; break; - case WEP_SNIPERRIFLE: + case WEP_RIFLE: ta = trueaim_rifle; mv = MOVE_NORMAL; if(zoomscript_caught) @@ -683,11 +683,11 @@ void CSQC_UpdateView(float w, float h) // the view to go back to normal, so reticle_type would become 0 as we fade out) if(spectatee_status || getstati(STAT_HEALTH) <= 0) reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators - else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_SNIPERRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught)) + else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_RIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught)) reticle_type = 2; // nex zoom else if(button_zoom || zoomscript_caught) reticle_type = 1; // normal zoom - else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_SNIPERRIFLE && button_attack2) + else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_RIFLE && button_attack2) reticle_type = 2; // nex zoom if (reticle_type) @@ -1186,8 +1186,8 @@ void CSQC_UpdateView(float w, float h) // Note: This is to stop Taoki from complaining that the image doesn't match all potential balances. // if a new image for another weapon is added, add the code (and its respective file/value) here - if ((activeweapon == WEP_SNIPERRIFLE) && (weapon_clipsize == 80)) - ring_image = "gfx/crosshair_ring_sniperrifle.tga"; + if ((activeweapon == WEP_RIFLE) && (weapon_clipsize == 80)) + ring_image = "gfx/crosshair_ring_rifle.tga"; else ring_image = "gfx/crosshair_ring.tga"; } diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 91256b9c5..65fe92c25 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -600,7 +600,7 @@ float GetAmmoTypeForWep(float i) case WEP_HLAC: return 3; case WEP_MINSTANEX: return 3; case WEP_NEX: return 3; - case WEP_SNIPERRIFLE: return 1; + case WEP_RIFLE: return 1; case WEP_HAGAR: return 2; case WEP_ROCKET_LAUNCHER: return 2; case WEP_SEEKER: return 2; @@ -1680,7 +1680,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s } else if(msg == MSG_KILL) { w = DEATH_WEAPONOF(type); if(WEP_VALID(w)) { - if((w == WEP_SNIPERRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here + if((w == WEP_RIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT); else HUD_KillNotify_Push(s1, s2, 1, type); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c index 640c28a34..6b14d1446 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c @@ -263,7 +263,7 @@ void XonoticMutatorsDialog_fill(entity me) me.TDempty(me, 0.2); me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", _("No start weapons"))); e.cvarOffValue = "-1"; - makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_sniperrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba g_start_weapon_minelayer"); + makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_rifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba g_start_weapon_minelayer"); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index d3112f73d..36b41896c 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -85,39 +85,39 @@ float autocvar_g_balance_armor_rot; float autocvar_g_balance_armor_rotlinear; float autocvar_g_balance_armor_rotstable; float autocvar_g_balance_armor_start; -float autocvar_g_balance_sniperrifle_bursttime; -float autocvar_g_balance_sniperrifle_primary_ammo; -float autocvar_g_balance_sniperrifle_primary_animtime; -float autocvar_g_balance_sniperrifle_primary_bulletconstant; -float autocvar_g_balance_sniperrifle_primary_bullethail; -float autocvar_g_balance_sniperrifle_primary_burstcost; -float autocvar_g_balance_sniperrifle_primary_damage; -float autocvar_g_balance_sniperrifle_primary_force; -float autocvar_g_balance_sniperrifle_primary_headshotaddeddamage; -float autocvar_g_balance_sniperrifle_primary_lifetime; -float autocvar_g_balance_sniperrifle_primary_refire; -float autocvar_g_balance_sniperrifle_primary_shots; -float autocvar_g_balance_sniperrifle_primary_speed; -float autocvar_g_balance_sniperrifle_primary_spread; -float autocvar_g_balance_sniperrifle_primary_tracer; -float autocvar_g_balance_sniperrifle_secondary; -float autocvar_g_balance_sniperrifle_secondary_ammo; -float autocvar_g_balance_sniperrifle_secondary_animtime; -float autocvar_g_balance_sniperrifle_secondary_bulletconstant; -float autocvar_g_balance_sniperrifle_secondary_bullethail; -float autocvar_g_balance_sniperrifle_secondary_burstcost; -float autocvar_g_balance_sniperrifle_secondary_damage; -float autocvar_g_balance_sniperrifle_secondary_force; -float autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage; -float autocvar_g_balance_sniperrifle_secondary_lifetime; -float autocvar_g_balance_sniperrifle_secondary_reload; -float autocvar_g_balance_sniperrifle_secondary_refire; -float autocvar_g_balance_sniperrifle_secondary_shots; -float autocvar_g_balance_sniperrifle_secondary_speed; -float autocvar_g_balance_sniperrifle_secondary_spread; -float autocvar_g_balance_sniperrifle_secondary_tracer; -float autocvar_g_balance_sniperrifle_reload_ammo; -float autocvar_g_balance_sniperrifle_reload_time; +float autocvar_g_balance_rifle_bursttime; +float autocvar_g_balance_rifle_primary_ammo; +float autocvar_g_balance_rifle_primary_animtime; +float autocvar_g_balance_rifle_primary_bulletconstant; +float autocvar_g_balance_rifle_primary_bullethail; +float autocvar_g_balance_rifle_primary_burstcost; +float autocvar_g_balance_rifle_primary_damage; +float autocvar_g_balance_rifle_primary_force; +float autocvar_g_balance_rifle_primary_headshotaddeddamage; +float autocvar_g_balance_rifle_primary_lifetime; +float autocvar_g_balance_rifle_primary_refire; +float autocvar_g_balance_rifle_primary_shots; +float autocvar_g_balance_rifle_primary_speed; +float autocvar_g_balance_rifle_primary_spread; +float autocvar_g_balance_rifle_primary_tracer; +float autocvar_g_balance_rifle_secondary; +float autocvar_g_balance_rifle_secondary_ammo; +float autocvar_g_balance_rifle_secondary_animtime; +float autocvar_g_balance_rifle_secondary_bulletconstant; +float autocvar_g_balance_rifle_secondary_bullethail; +float autocvar_g_balance_rifle_secondary_burstcost; +float autocvar_g_balance_rifle_secondary_damage; +float autocvar_g_balance_rifle_secondary_force; +float autocvar_g_balance_rifle_secondary_headshotaddeddamage; +float autocvar_g_balance_rifle_secondary_lifetime; +float autocvar_g_balance_rifle_secondary_reload; +float autocvar_g_balance_rifle_secondary_refire; +float autocvar_g_balance_rifle_secondary_shots; +float autocvar_g_balance_rifle_secondary_speed; +float autocvar_g_balance_rifle_secondary_spread; +float autocvar_g_balance_rifle_secondary_tracer; +float autocvar_g_balance_rifle_reload_ammo; +float autocvar_g_balance_rifle_reload_time; float autocvar_g_balance_cloaked_alpha; float autocvar_g_balance_crylink_primary_ammo; float autocvar_g_balance_crylink_primary_animtime; diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 708ae9452..dd111d9f0 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -259,7 +259,7 @@ void havocbot_bunnyhop(vector dir) // Don't jump when using some weapons /* if(self.aistatus & AI_STATUS_ATTACKING) - if(self.weapon == WEP_SNIPERRIFLE) + if(self.weapon == WEP_RIFLE) return; if(self.goalcurrent.classname == "player") @@ -918,7 +918,7 @@ void havocbot_chooseenemy() // I want to do a second scan if no enemy was found or I don't have weapons // TODO: Perform the scan when using the rifle (requires changes on the rifle code) - if(best || self.weapons) // || self.weapon == WEP_SNIPERRIFLE + if(best || self.weapons) // || self.weapon == WEP_RIFLE break; if(i) break; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 3d6adb688..ffeba55eb 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1134,7 +1134,7 @@ float ClientInit_SendEntity(entity to, float sf) WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor WriteCoord(MSG_ENTITY, self.ebouncestop); // g_balance_grenadelauncher_bouncestop WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not - WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not + WriteByte(MSG_ENTITY, autocvar_g_balance_rifle_secondary); // client has to know if it should zoom or not WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not WriteByte(MSG_ENTITY, autocvar_g_balance_minelayer_limit); // minelayer max mines WriteByte(MSG_ENTITY, autocvar_g_balance_hagar_secondary_load_max); // hagar max loadable rockets @@ -2901,7 +2901,7 @@ void PlayerPreThink (void) } if(!zoomstate_set) - SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0)); + SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_RIFLE && autocvar_g_balance_rifle_secondary == 0)); float oldspectatee_status; oldspectatee_status = self.spectatee_status; diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 6a3f5ea88..8589a8806 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -142,7 +142,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m local float oldsolid; vector vecs, dv; oldsolid = ent.dphitcontentsmask; - if(ent.weapon == WEP_SNIPERRIFLE) + if(ent.weapon == WEP_RIFLE) ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE; else ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE; diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 8cc7e4797..f2a1138d8 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -23,7 +23,7 @@ void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); } void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); } // Rail -> Rifle -void spawnfunc_weapon_railgun() { spawnfunc_weapon_sniperrifle(); } +void spawnfunc_weapon_railgun() { spawnfunc_weapon_rifle(); } void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); } // BFG -> Crylink diff --git a/qcsrc/server/w_all.qc b/qcsrc/server/w_all.qc index 930a413d5..ac4ef47ed 100644 --- a/qcsrc/server/w_all.qc +++ b/qcsrc/server/w_all.qc @@ -16,6 +16,6 @@ #include "w_hook.qc" #include "w_hlac.qc" #include "w_tuba.qc" -#include "w_sniperrifle.qc" +#include "w_rifle.qc" #include "w_fireball.qc" #include "w_seeker.qc" diff --git a/qcsrc/server/w_rifle.qc b/qcsrc/server/w_rifle.qc new file mode 100644 index 000000000..131a0527d --- /dev/null +++ b/qcsrc/server/w_rifle.qc @@ -0,0 +1,265 @@ +#ifdef REGISTER_WEAPON +REGISTER_WEAPON(RIFLE, w_rifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "rifle", _("Rifle")) +#else +#ifdef SVQC + +.float rifle_accumulator; + +void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound) +{ + float i; + + W_DecreaseAmmo(ammo_nails, pAmmo, autocvar_g_balance_rifle_reload_ammo); + + W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, pSound, CHAN_WEAPON, (pDamage + pHeadshotAddedDamage) * pShots); + + pointparticles(particleeffectnum("rifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1); + + if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye + { + w_shotdir = v_forward; + w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward; + } + + for(i = 0; i < pShots; ++i) + fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), 1, pBulletConstant); + endFireBallisticBullet(); + + if (autocvar_g_casings >= 2) + SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self); +} + +void W_Rifle_Attack() +{ + W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, autocvar_g_balance_rifle_primary_headshotaddeddamage, autocvar_g_balance_rifle_primary_force, autocvar_g_balance_rifle_primary_speed, autocvar_g_balance_rifle_primary_lifetime, autocvar_g_balance_rifle_primary_ammo, WEP_RIFLE, autocvar_g_balance_rifle_primary_bulletconstant, autocvar_g_balance_rifle_primary_tracer, autocvar_g_balance_rifle_primary_shots, "weapons/campingrifle_fire.wav"); +} + +void W_Rifle_Attack2() +{ + W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, autocvar_g_balance_rifle_secondary_headshotaddeddamage, autocvar_g_balance_rifle_secondary_force, autocvar_g_balance_rifle_secondary_speed, autocvar_g_balance_rifle_secondary_lifetime, autocvar_g_balance_rifle_secondary_ammo, WEP_RIFLE | HITTYPE_SECONDARY, autocvar_g_balance_rifle_secondary_bulletconstant, autocvar_g_balance_rifle_secondary_tracer, autocvar_g_balance_rifle_secondary_shots, "weapons/campingrifle_fire2.wav"); +} + +void spawnfunc_weapon_rifle (void) +{ + weapon_defaultspawnfunc(WEP_RIFLE); +} + +// compatibility alias +void spawnfunc_weapon_campingrifle (void) +{ + spawnfunc_weapon_rifle(); +} +void spawnfunc_weapon_sniperrifle (void) +{ + spawnfunc_weapon_rifle(); +} + +.void(void) rifle_bullethail_attackfunc; +.float rifle_bullethail_frame; +.float rifle_bullethail_animtime; +.float rifle_bullethail_refire; +void W_Rifle_BulletHail_Continue() +{ + float r, sw, af; + + sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing + af = ATTACK_FINISHED(self); + self.switchweapon = self.weapon; + ATTACK_FINISHED(self) = time; + print(ftos(self.ammo_nails), "\n"); + r = weapon_prepareattack(self.rifle_bullethail_frame == WFRAME_FIRE2, self.rifle_bullethail_refire); + if(self.switchweapon == self.weapon) + self.switchweapon = sw; + if(r) + { + self.rifle_bullethail_attackfunc(); + weapon_thinkf(self.rifle_bullethail_frame, self.rifle_bullethail_animtime, W_Rifle_BulletHail_Continue); + print("thinkf set\n"); + } + else + { + ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time + print("out of ammo... ", ftos(self.weaponentity.state), "\n"); + } +} + +void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire) +{ + // if we get here, we have at least one bullet to fire + AttackFunc(); + if(mode) + { + // continue hail + self.rifle_bullethail_attackfunc = AttackFunc; + self.rifle_bullethail_frame = fr; + self.rifle_bullethail_animtime = animtime; + self.rifle_bullethail_refire = refire; + weapon_thinkf(fr, animtime, W_Rifle_BulletHail_Continue); + } + else + { + // just one shot + weapon_thinkf(fr, animtime, w_ready); + } +} + +.float bot_secondary_riflemooth; +float w_rifle(float req) +{ + float ammo_amount; + + if (req == WR_AIM) + { + self.BUTTON_ATCK=FALSE; + self.BUTTON_ATCK2=FALSE; + if(vlen(self.origin-self.enemy.origin) > 1000) + self.bot_secondary_riflemooth = 0; + if(self.bot_secondary_riflemooth == 0) + { + if(bot_aim(autocvar_g_balance_rifle_primary_speed, 0, autocvar_g_balance_rifle_primary_lifetime, TRUE)) + { + self.BUTTON_ATCK = TRUE; + if(random() < 0.01) self.bot_secondary_riflemooth = 1; + } + } + else + { + if(bot_aim(autocvar_g_balance_rifle_secondary_speed, 0, autocvar_g_balance_rifle_secondary_lifetime, TRUE)) + { + self.BUTTON_ATCK2 = TRUE; + if(random() < 0.03) self.bot_secondary_riflemooth = 0; + } + } + } + else if (req == WR_THINK) + { + if(autocvar_g_balance_rifle_reload_ammo && self.clip_load < min(autocvar_g_balance_rifle_primary_ammo, autocvar_g_balance_rifle_secondary_ammo)) // forced reload + weapon_action(self.weapon, WR_RELOAD); + else + { + self.rifle_accumulator = bound(time - autocvar_g_balance_rifle_bursttime, self.rifle_accumulator, time); + if (self.BUTTON_ATCK) + if (weapon_prepareattack_check(0, autocvar_g_balance_rifle_primary_refire)) + if (time >= self.rifle_accumulator + autocvar_g_balance_rifle_primary_burstcost) + { + weapon_prepareattack_do(0, autocvar_g_balance_rifle_primary_refire); + W_Rifle_BulletHail(autocvar_g_balance_rifle_primary_bullethail, W_Rifle_Attack, WFRAME_FIRE1, autocvar_g_balance_rifle_primary_animtime, autocvar_g_balance_rifle_primary_refire); + self.rifle_accumulator += autocvar_g_balance_rifle_primary_burstcost; + } + if (self.BUTTON_ATCK2) + { + if (autocvar_g_balance_rifle_secondary) + { + if(autocvar_g_balance_rifle_secondary_reload) + weapon_action(self.weapon, WR_RELOAD); + else + { + if (weapon_prepareattack_check(1, autocvar_g_balance_rifle_secondary_refire)) + if (time >= self.rifle_accumulator + autocvar_g_balance_rifle_secondary_burstcost) + { + weapon_prepareattack_do(1, autocvar_g_balance_rifle_secondary_refire); + W_Rifle_BulletHail(autocvar_g_balance_rifle_secondary_bullethail, W_Rifle_Attack2, WFRAME_FIRE2, autocvar_g_balance_rifle_secondary_animtime, autocvar_g_balance_rifle_primary_refire); + self.rifle_accumulator += autocvar_g_balance_rifle_secondary_burstcost; + } + } + } + } + } + } + else if (req == WR_PRECACHE) + { + precache_model ("models/weapons/g_campingrifle.md3"); + precache_model ("models/weapons/v_campingrifle.md3"); + precache_model ("models/weapons/h_campingrifle.iqm"); + precache_sound ("weapons/campingrifle_fire.wav"); + precache_sound ("weapons/campingrifle_fire2.wav"); + //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else + } + else if (req == WR_SETUP) + { + weapon_setup(WEP_RIFLE); + self.current_ammo = ammo_nails; + } + else if (req == WR_CHECKAMMO1) + { + ammo_amount = self.ammo_nails >= autocvar_g_balance_rifle_primary_ammo; + ammo_amount += self.weapon_load[WEP_RIFLE] >= autocvar_g_balance_rifle_primary_ammo; + return ammo_amount; + } + else if (req == WR_CHECKAMMO2) + { + ammo_amount = self.ammo_nails >= autocvar_g_balance_rifle_secondary_ammo; + ammo_amount += self.weapon_load[WEP_RIFLE] >= autocvar_g_balance_rifle_secondary_ammo; + return ammo_amount; + } + else if (req == WR_RESETPLAYER) + { + self.rifle_accumulator = time - autocvar_g_balance_rifle_bursttime; + } + else if (req == WR_RELOAD) + { + W_Reload(min(autocvar_g_balance_rifle_primary_ammo, autocvar_g_balance_rifle_secondary_ammo), autocvar_g_balance_rifle_reload_ammo, autocvar_g_balance_rifle_reload_time, "weapons/reload.wav"); + } + return TRUE; +}; +#endif +#ifdef CSQC +float w_rifle(float req) +{ + if(req == WR_IMPACTEFFECT) + { + vector org2; + org2 = w_org + w_backoff * 2; + pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1); + if(!w_issilent) + { + if(w_random < 0.2) + sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM); + else if(w_random < 0.4) + sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM); + else if(w_random < 0.5) + sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); + } + } + else if(req == WR_PRECACHE) + { + precache_sound("weapons/ric1.wav"); + precache_sound("weapons/ric2.wav"); + precache_sound("weapons/ric3.wav"); + } + else if (req == WR_SUICIDEMESSAGE) + { + if(w_deathtype & HITTYPE_SECONDARY) + w_deathtypestring = _("%s shot themself automatically"); + else + 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"); + else + 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"); + } + else + { + if(w_deathtype & HITTYPE_HEADSHOT) + w_deathtypestring = _("%s got hit in the head by %s"); + else + w_deathtypestring = _("%s was sniped by %s"); + } + } + } + return TRUE; +} +#endif +#endif diff --git a/qcsrc/server/w_sniperrifle.qc b/qcsrc/server/w_sniperrifle.qc deleted file mode 100644 index 55f7896e0..000000000 --- a/qcsrc/server/w_sniperrifle.qc +++ /dev/null @@ -1,261 +0,0 @@ -#ifdef REGISTER_WEAPON -REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "sniperrifle", _("Sniper Rifle")) -#else -#ifdef SVQC - -.float sniperrifle_accumulator; - -void W_SniperRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage, float pForce, float pSpeed, float pLifetime, float pAmmo, float deathtype, float pBulletConstant, float pTracer, float pShots, string pSound) -{ - float i; - - W_DecreaseAmmo(ammo_nails, pAmmo, autocvar_g_balance_sniperrifle_reload_ammo); - - W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, pSound, CHAN_WEAPON, (pDamage + pHeadshotAddedDamage) * pShots); - - pointparticles(particleeffectnum("sniperrifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1); - - if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye - { - w_shotdir = v_forward; - w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward; - } - - for(i = 0; i < pShots; ++i) - fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), 1, pBulletConstant); - endFireBallisticBullet(); - - if (autocvar_g_casings >= 2) - SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self); -} - -void W_SniperRifle_Attack() -{ - W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_primary_spread, autocvar_g_balance_sniperrifle_primary_damage, autocvar_g_balance_sniperrifle_primary_headshotaddeddamage, autocvar_g_balance_sniperrifle_primary_force, autocvar_g_balance_sniperrifle_primary_speed, autocvar_g_balance_sniperrifle_primary_lifetime, autocvar_g_balance_sniperrifle_primary_ammo, WEP_SNIPERRIFLE, autocvar_g_balance_sniperrifle_primary_bulletconstant, autocvar_g_balance_sniperrifle_primary_tracer, autocvar_g_balance_sniperrifle_primary_shots, "weapons/campingrifle_fire.wav"); -} - -void W_SniperRifle_Attack2() -{ - W_SniperRifle_FireBullet(autocvar_g_balance_sniperrifle_secondary_spread, autocvar_g_balance_sniperrifle_secondary_damage, autocvar_g_balance_sniperrifle_secondary_headshotaddeddamage, autocvar_g_balance_sniperrifle_secondary_force, autocvar_g_balance_sniperrifle_secondary_speed, autocvar_g_balance_sniperrifle_secondary_lifetime, autocvar_g_balance_sniperrifle_secondary_ammo, WEP_SNIPERRIFLE | HITTYPE_SECONDARY, autocvar_g_balance_sniperrifle_secondary_bulletconstant, autocvar_g_balance_sniperrifle_secondary_tracer, autocvar_g_balance_sniperrifle_secondary_shots, "weapons/campingrifle_fire2.wav"); -} - -void spawnfunc_weapon_sniperrifle (void) -{ - weapon_defaultspawnfunc(WEP_SNIPERRIFLE); -} - -// compatibility alias -void spawnfunc_weapon_campingrifle (void) -{ - spawnfunc_weapon_sniperrifle(); -} - -.void(void) sniperrifle_bullethail_attackfunc; -.float sniperrifle_bullethail_frame; -.float sniperrifle_bullethail_animtime; -.float sniperrifle_bullethail_refire; -void W_SniperRifle_BulletHail_Continue() -{ - float r, sw, af; - - sw = self.switchweapon; // make it not detect weapon changes as reason to abort firing - af = ATTACK_FINISHED(self); - self.switchweapon = self.weapon; - ATTACK_FINISHED(self) = time; - print(ftos(self.ammo_nails), "\n"); - r = weapon_prepareattack(self.sniperrifle_bullethail_frame == WFRAME_FIRE2, self.sniperrifle_bullethail_refire); - if(self.switchweapon == self.weapon) - self.switchweapon = sw; - if(r) - { - self.sniperrifle_bullethail_attackfunc(); - weapon_thinkf(self.sniperrifle_bullethail_frame, self.sniperrifle_bullethail_animtime, W_SniperRifle_BulletHail_Continue); - print("thinkf set\n"); - } - else - { - ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time - print("out of ammo... ", ftos(self.weaponentity.state), "\n"); - } -} - -void W_SniperRifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animtime, float refire) -{ - // if we get here, we have at least one bullet to fire - AttackFunc(); - if(mode) - { - // continue hail - self.sniperrifle_bullethail_attackfunc = AttackFunc; - self.sniperrifle_bullethail_frame = fr; - self.sniperrifle_bullethail_animtime = animtime; - self.sniperrifle_bullethail_refire = refire; - weapon_thinkf(fr, animtime, W_SniperRifle_BulletHail_Continue); - } - else - { - // just one shot - weapon_thinkf(fr, animtime, w_ready); - } -} - -.float bot_secondary_sniperriflemooth; -float w_sniperrifle(float req) -{ - float ammo_amount; - - if (req == WR_AIM) - { - self.BUTTON_ATCK=FALSE; - self.BUTTON_ATCK2=FALSE; - if(vlen(self.origin-self.enemy.origin) > 1000) - self.bot_secondary_sniperriflemooth = 0; - if(self.bot_secondary_sniperriflemooth == 0) - { - if(bot_aim(autocvar_g_balance_sniperrifle_primary_speed, 0, autocvar_g_balance_sniperrifle_primary_lifetime, TRUE)) - { - self.BUTTON_ATCK = TRUE; - if(random() < 0.01) self.bot_secondary_sniperriflemooth = 1; - } - } - else - { - if(bot_aim(autocvar_g_balance_sniperrifle_secondary_speed, 0, autocvar_g_balance_sniperrifle_secondary_lifetime, TRUE)) - { - self.BUTTON_ATCK2 = TRUE; - if(random() < 0.03) self.bot_secondary_sniperriflemooth = 0; - } - } - } - else if (req == WR_THINK) - { - if(autocvar_g_balance_sniperrifle_reload_ammo && self.clip_load < min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo)) // forced reload - weapon_action(self.weapon, WR_RELOAD); - else - { - self.sniperrifle_accumulator = bound(time - autocvar_g_balance_sniperrifle_bursttime, self.sniperrifle_accumulator, time); - if (self.BUTTON_ATCK) - if (weapon_prepareattack_check(0, autocvar_g_balance_sniperrifle_primary_refire)) - if (time >= self.sniperrifle_accumulator + autocvar_g_balance_sniperrifle_primary_burstcost) - { - weapon_prepareattack_do(0, autocvar_g_balance_sniperrifle_primary_refire); - W_SniperRifle_BulletHail(autocvar_g_balance_sniperrifle_primary_bullethail, W_SniperRifle_Attack, WFRAME_FIRE1, autocvar_g_balance_sniperrifle_primary_animtime, autocvar_g_balance_sniperrifle_primary_refire); - self.sniperrifle_accumulator += autocvar_g_balance_sniperrifle_primary_burstcost; - } - if (self.BUTTON_ATCK2) - { - if (autocvar_g_balance_sniperrifle_secondary) - { - if(autocvar_g_balance_sniperrifle_secondary_reload) - weapon_action(self.weapon, WR_RELOAD); - 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; - } - } - } - } - } - } - else if (req == WR_PRECACHE) - { - precache_model ("models/weapons/g_campingrifle.md3"); - precache_model ("models/weapons/v_campingrifle.md3"); - precache_model ("models/weapons/h_campingrifle.iqm"); - precache_sound ("weapons/campingrifle_fire.wav"); - precache_sound ("weapons/campingrifle_fire2.wav"); - //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else - } - else if (req == WR_SETUP) - { - weapon_setup(WEP_SNIPERRIFLE); - self.current_ammo = ammo_nails; - } - else if (req == WR_CHECKAMMO1) - { - ammo_amount = self.ammo_nails >= autocvar_g_balance_sniperrifle_primary_ammo; - ammo_amount += self.weapon_load[WEP_SNIPERRIFLE] >= autocvar_g_balance_sniperrifle_primary_ammo; - return ammo_amount; - } - else if (req == WR_CHECKAMMO2) - { - ammo_amount = self.ammo_nails >= autocvar_g_balance_sniperrifle_secondary_ammo; - ammo_amount += self.weapon_load[WEP_SNIPERRIFLE] >= autocvar_g_balance_sniperrifle_secondary_ammo; - return ammo_amount; - } - else if (req == WR_RESETPLAYER) - { - self.sniperrifle_accumulator = time - autocvar_g_balance_sniperrifle_bursttime; - } - else if (req == WR_RELOAD) - { - W_Reload(min(autocvar_g_balance_sniperrifle_primary_ammo, autocvar_g_balance_sniperrifle_secondary_ammo), autocvar_g_balance_sniperrifle_reload_ammo, autocvar_g_balance_sniperrifle_reload_time, "weapons/reload.wav"); - } - return TRUE; -}; -#endif -#ifdef CSQC -float w_sniperrifle(float req) -{ - if(req == WR_IMPACTEFFECT) - { - vector org2; - org2 = w_org + w_backoff * 2; - pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1); - if(!w_issilent) - { - if(w_random < 0.2) - sound(self, CHAN_PROJECTILE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM); - else if(w_random < 0.4) - sound(self, CHAN_PROJECTILE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM); - else if(w_random < 0.5) - sound(self, CHAN_PROJECTILE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM); - } - } - else if(req == WR_PRECACHE) - { - precache_sound("weapons/ric1.wav"); - precache_sound("weapons/ric2.wav"); - precache_sound("weapons/ric3.wav"); - } - else if (req == WR_SUICIDEMESSAGE) - { - if(w_deathtype & HITTYPE_SECONDARY) - w_deathtypestring = _("%s shot themself automatically"); - else - 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"); - else - 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"); - } - else - { - if(w_deathtype & HITTYPE_HEADSHOT) - w_deathtypestring = _("%s got hit in the head by %s"); - else - w_deathtypestring = _("%s was sniped by %s"); - } - } - } - return TRUE; -} -#endif -#endif