From 334f8247b82a5aba3fe56cbabd59f77bcf0e3d03 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 12 Feb 2013 16:54:53 +0100 Subject: [PATCH] animation blending makes headshots pointless; so let's remove them --- balance25.cfg | 2 - balanceFruitieX.cfg | 2 - balanceXDF.cfg | 2 - balanceXPM.cfg | 2 - balanceXonotic.cfg | 2 - defaultXonotic.cfg | 1 - mutator_new_toys.cfg | 6 +-- qcsrc/client/announcer.qc | 1 - qcsrc/client/hud.qc | 4 -- qcsrc/common/constants.qh | 2 +- qcsrc/server/autocvars.qh | 4 -- qcsrc/server/cl_client.qc | 33 ---------------- qcsrc/server/g_damage.qc | 39 ------------------- .../server/tturrets/units/unit_machinegun.qc | 2 +- qcsrc/server/tturrets/units/unit_walker.qc | 2 +- qcsrc/server/vehicles/spiderbot.qc | 4 +- qcsrc/server/w_common.qc | 18 ++------- qcsrc/server/w_fireball.qc | 7 +--- qcsrc/server/w_minstanex.qc | 7 ---- qcsrc/server/w_rifle.qc | 20 +++------- qcsrc/server/w_seeker.qc | 31 ++++++++------- qcsrc/server/w_shotgun.qc | 2 +- qcsrc/server/w_tuba.qc | 6 --- qcsrc/server/w_uzi.qc | 8 ++-- 24 files changed, 40 insertions(+), 167 deletions(-) diff --git a/balance25.cfg b/balance25.cfg index 068f650f8..666482f4a 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3 set g_balance_uzi_first 1 set g_balance_uzi_first_damage 30 -set g_balance_uzi_first_headshotaddeddamage 0 set g_balance_uzi_first_force 50 set g_balance_uzi_first_spread 0.015 set g_balance_uzi_first_refire 0.2 set g_balance_uzi_first_ammo 1 set g_balance_uzi_sustained_damage 15 -set g_balance_uzi_sustained_headshotaddeddamage 0 set g_balance_uzi_sustained_force 27 set g_balance_uzi_sustained_spread 0.05 set g_balance_uzi_sustained_refire 0.1 diff --git a/balanceFruitieX.cfg b/balanceFruitieX.cfg index 5ccd6827b..cd73187ec 100644 --- a/balanceFruitieX.cfg +++ b/balanceFruitieX.cfg @@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3 set g_balance_uzi_first 1 set g_balance_uzi_first_damage 15 / f/ LOG: 22 -> 15 -set g_balance_uzi_first_headshotaddeddamage 0 set g_balance_uzi_first_force 50 set g_balance_uzi_first_spread 0.03 set g_balance_uzi_first_refire 0.2 set g_balance_uzi_first_ammo 2 set g_balance_uzi_sustained_damage 12 // 120 dps -set g_balance_uzi_sustained_headshotaddeddamage 0 set g_balance_uzi_sustained_force 12 set g_balance_uzi_sustained_spread 0.06 set g_balance_uzi_sustained_refire 0.1 diff --git a/balanceXDF.cfg b/balanceXDF.cfg index 543a5c617..514433c32 100644 --- a/balanceXDF.cfg +++ b/balanceXDF.cfg @@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3 set g_balance_uzi_first 1 set g_balance_uzi_first_damage 14 -set g_balance_uzi_first_headshotaddeddamage 0 set g_balance_uzi_first_force 5 set g_balance_uzi_first_spread 0.03 set g_balance_uzi_first_refire 0.4 set g_balance_uzi_first_ammo 1 set g_balance_uzi_sustained_damage 12 -set g_balance_uzi_sustained_headshotaddeddamage 0 set g_balance_uzi_sustained_force 5 set g_balance_uzi_sustained_spread 0 set g_balance_uzi_sustained_refire 0.1 diff --git a/balanceXPM.cfg b/balanceXPM.cfg index cd440294c..fc02dc9cb 100644 --- a/balanceXPM.cfg +++ b/balanceXPM.cfg @@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3 set g_balance_uzi_first 1 set g_balance_uzi_first_damage 14 -set g_balance_uzi_first_headshotaddeddamage 0 set g_balance_uzi_first_force 5 set g_balance_uzi_first_spread 0.03 set g_balance_uzi_first_refire 0.125 set g_balance_uzi_first_ammo 1 set g_balance_uzi_sustained_damage 10 // 100 dps -set g_balance_uzi_sustained_headshotaddeddamage 0 set g_balance_uzi_sustained_force 5 set g_balance_uzi_sustained_spread 0.03 set g_balance_uzi_sustained_refire 0.1 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 871b9a390..a0252cb48 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -306,14 +306,12 @@ set g_balance_uzi_burst_ammo 3 set g_balance_uzi_first 1 set g_balance_uzi_first_damage 14 -set g_balance_uzi_first_headshotaddeddamage 0 set g_balance_uzi_first_force 5 set g_balance_uzi_first_spread 0.03 set g_balance_uzi_first_refire 0.125 set g_balance_uzi_first_ammo 1 set g_balance_uzi_sustained_damage 10 // 100 dps -set g_balance_uzi_sustained_headshotaddeddamage 0 set g_balance_uzi_sustained_force 5 set g_balance_uzi_sustained_spread 0.03 set g_balance_uzi_sustained_refire 0.1 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 4c5339bb8..16fe913ae 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -244,7 +244,6 @@ set sv_friction_on_land 0 set sv_player_viewoffset "0 0 35" "view offset of the player model" set sv_player_mins "-16 -16 -24" "playermodel mins" set sv_player_maxs "16 16 45" "playermodel maxs" -set sv_player_headsize "24 24 12" "playermodel headshot bbox size (centered at top of player bbox, preview with r_showbboxes)" // actually SHOULD be 19.2 19.2 10 according to docs set sv_player_crouch_viewoffset "0 0 20" "view offset of the player model when crouched" set sv_player_crouch_mins "-16 -16 -24" "mins of a crouched playermodel" set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel" diff --git a/mutator_new_toys.cfg b/mutator_new_toys.cfg index c4f20995a..7b4a9ab9f 100644 --- a/mutator_new_toys.cfg +++ b/mutator_new_toys.cfg @@ -76,8 +76,7 @@ set g_balance_minelayer_reload_time 2 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 40 +set g_balance_rifle_primary_damage 80 set g_balance_rifle_primary_spread 0 set g_balance_rifle_primary_force 100 set g_balance_rifle_primary_speed 40000 @@ -92,8 +91,7 @@ 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 20 +set g_balance_rifle_secondary_damage 20 set g_balance_rifle_secondary_spread 0.04 set g_balance_rifle_secondary_force 50 set g_balance_rifle_secondary_speed 20000 diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index ec4cc78f6..ce7077e43 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -158,7 +158,6 @@ void Announcer_Precache () precache_sound (strcat("announcer/", autocvar_cl_announcer, "/yoda.wav")); precache_sound (strcat("announcer/", autocvar_cl_announcer, "/amazing.wav")); precache_sound (strcat("announcer/", autocvar_cl_announcer, "/awesome.wav")); - precache_sound (strcat("announcer/", autocvar_cl_announcer, "/headshot.wav")); precache_sound (strcat("announcer/", autocvar_cl_announcer, "/impressive.wav")); precache_sound (strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav")); diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 7c1e25664..5bbffa5ec 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2363,10 +2363,6 @@ void HUD_Notify (void) { s = "notify_melee_shotgun"; } - else if(type & HITTYPE_HEADSHOT && (w == WEP_RIFLE || w == WEP_MINSTANEX)) // all headshot weapons go here - { - s = "notify_headshot"; - } else if(WEP_VALID(w)) { self = get_weaponinfo(w); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 75f5a0bde..cdc58cb55 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -432,7 +432,7 @@ float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal de float HITTYPE_SECONDARY = 0x100; float HITTYPE_SPLASH = 0x200; // automatically set by RadiusDamage float HITTYPE_BOUNCE = 0x400; -float HITTYPE_HEADSHOT = 0x800; // automatically set by Damage (if headshotbonus is set) +float HITTYPE_RESERVED2 = 0x800; float HITTYPE_RESERVED = 0x1000; // unused yet // macros to access these diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 7747e0dff..08a6297ad 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -94,7 +94,6 @@ 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; @@ -109,7 +108,6 @@ 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; @@ -704,7 +702,6 @@ float autocvar_g_balance_uzi_burst_spread; float autocvar_g_balance_uzi_first; float autocvar_g_balance_uzi_first_ammo; float autocvar_g_balance_uzi_first_damage; -float autocvar_g_balance_uzi_first_headshotaddeddamage; float autocvar_g_balance_uzi_first_force; float autocvar_g_balance_uzi_first_refire; float autocvar_g_balance_uzi_first_spread; @@ -715,7 +712,6 @@ float autocvar_g_balance_uzi_spread_max; float autocvar_g_balance_uzi_spread_min; float autocvar_g_balance_uzi_sustained_ammo; float autocvar_g_balance_uzi_sustained_damage; -float autocvar_g_balance_uzi_sustained_headshotaddeddamage; float autocvar_g_balance_uzi_sustained_force; float autocvar_g_balance_uzi_sustained_refire; float autocvar_g_balance_uzi_sustained_spread; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 1078eea13..53dd6f1dd 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2965,18 +2965,6 @@ Called every frame for each client after the physics are run ============= */ .float idlekick_lasttimeleft; -.entity showheadshotbbox; -void showheadshotbbox_think() -{ - if(self.owner.showheadshotbbox != self) - { - remove(self); - return; - } - self.nextthink = time; - setorigin(self, self.owner.origin); - setsize(self, GetHeadshotMins(self.owner), GetHeadshotMaxs(self.owner)); -} void PlayerPostThink (void) { // Savage: Check for nameless players @@ -3066,27 +3054,6 @@ void PlayerPostThink (void) if(self.waypointsprite_attachedforcarrier) WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent)); - if(self.classname == "player" && self.deadflag == DEAD_NO && autocvar_r_showbboxes) - { - if(!self.showheadshotbbox) - { - self.showheadshotbbox = spawn(); - self.showheadshotbbox.classname = "headshotbbox"; - self.showheadshotbbox.owner = self; - self.showheadshotbbox.think = showheadshotbbox_think; - self.showheadshotbbox.nextthink = time; - self = self.showheadshotbbox; - self.think(); - self = self.owner; - } - } - else - { - if(self.showheadshotbbox) - if(self.showheadshotbbox && !wasfreed(self.showheadshotbbox)) - remove(self.showheadshotbbox); - } - playerdemo_write(); if((g_cts || g_race) && self.cvar_cl_allow_uidtracking == 1 && self.cvar_cl_allow_uid2name == 1) diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a3eeefb73..31512fbff 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -47,8 +47,6 @@ float checkrules_firstblood; float yoda; float damage_goodhits; float damage_gooddamage; -float headshot; -float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after use .float dmg_team; .float teamkill_complain; @@ -86,15 +84,6 @@ float IsFlying(entity a) return 1; } -vector GetHeadshotMins(entity targ) -{ - return '-0.5 0 0' * PL_HEAD_x + '0 -0.5 0' * PL_HEAD_y + '0 0 1' * (targ.maxs_z - PL_HEAD_z); -} -vector GetHeadshotMaxs(entity targ) -{ - return '0.5 0 0' * PL_HEAD_x + '0 0.5 0' * PL_HEAD_y + '0 0 1' * targ.maxs_z; -} - void UpdateFrags(entity player, float f) { PlayerTeamScore_AddScore(player, f); @@ -792,31 +781,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if(targ.takedamage == DAMAGE_AIM) if(targ != attacker) { - if(damage_headshotbonus) - { - if(targ.classname == "player") - { - // HEAD SHOT: - // find height of hit on player axis - // if above view_ofs and below maxs, and also in the middle half of the bbox, it is head shot - vector headmins, headmaxs, org; - org = antilag_takebackorigin(targ, time - ANTILAG_LATENCY(attacker)); - headmins = org + GetHeadshotMins(targ); - headmaxs = org + GetHeadshotMaxs(targ); - if(trace_hits_box(railgun_start, railgun_end, headmins, headmaxs)) - { - deathtype |= HITTYPE_HEADSHOT; - } - } - else if(targ.classname == "turret_head") - { - deathtype |= HITTYPE_HEADSHOT; - } - if(deathtype & HITTYPE_HEADSHOT) - if(damage_headshotbonus > 0) - damage *= 1 + damage_headshotbonus; - } - entity victim; if((targ.vehicle_flags & VHF_ISVEHICLE) && targ.owner) victim = targ.owner; @@ -850,9 +814,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if(g_minstagib) if(victim.items & IT_STRENGTH) yoda = 1; - - if(deathtype & HITTYPE_HEADSHOT) - headshot = 1; } } } diff --git a/qcsrc/server/tturrets/units/unit_machinegun.qc b/qcsrc/server/tturrets/units/unit_machinegun.qc index f96d3b93c..9358cd7ba 100644 --- a/qcsrc/server/tturrets/units/unit_machinegun.qc +++ b/qcsrc/server/tturrets/units/unit_machinegun.qc @@ -5,7 +5,7 @@ void turret_machinegun_attack(); //.float bulletcounter; void turret_machinegun_attack() { - fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_MACHINEGUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_MACHINEGUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); UziFlash(); diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index 041c16929..4bd1d0760 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -515,7 +515,7 @@ void walker_postthink() void walker_attack() { sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM); - fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1); } diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index 9bbdd096a..de12407f5 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -495,10 +495,10 @@ float spiderbot_frame() v_forward = normalize(v_forward); v += v_forward * 50; -//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant) +//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant) fireBallisticBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_speed, - 5, autocvar_g_vehicle_spiderbot_minigun_damage, 0, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_SBMINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant); + 5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_SBMINIGUN, 0, 1, autocvar_g_vehicle_spiderbot_minigun_bulletconstant); endFireBallisticBullet(); // fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage, diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index bbd9c647b..67f5b3356 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -167,7 +167,6 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f trace_dphitq3surfaceflags = endq3surfaceflags; } -.float dmg_edge; .float dmg_force; .float dmg_radius; .float dmg_total; @@ -185,24 +184,14 @@ void W_BallisticBullet_Hit (void) { endzcurveparticles(); - headshot = 0; yoda = 0; - damage_headshotbonus = self.dmg_edge * f; railgun_start = self.origin - 2 * frametime * self.velocity; railgun_end = self.origin + 2 * frametime * self.velocity; g = accuracy_isgooddamage(self.realowner, other); Damage(other, self, self.realowner, self.dmg * f, self.projectiledeathtype, self.origin, self.dmg_force * normalize(self.velocity) * f); - damage_headshotbonus = 0; - if(headshot) - f *= q; - if(self.dmg_edge > 0) - { - if(headshot) - AnnounceTo(self.realowner, "headshot"); - if(yoda) - AnnounceTo(self.realowner, "awesome"); - } + if(yoda) + AnnounceTo(self.realowner, "awesome"); // calculate hits for ballistic weapons if(g) @@ -398,7 +387,7 @@ void fireBallisticBullet_trace_callback(vector start, vector hit, vector end) self.owner = world; } -void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant) +void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant) { float lag, dt, savetime; //, density; entity pl, oldself; @@ -434,7 +423,6 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f proj.touch = W_BallisticBullet_Touch; proj.dmg = damage; - proj.dmg_edge = headshotbonus; proj.dmg_force = force; proj.projectiledeathtype = dtype; diff --git a/qcsrc/server/w_fireball.qc b/qcsrc/server/w_fireball.qc index 02557ad94..508a8ba1a 100644 --- a/qcsrc/server/w_fireball.qc +++ b/qcsrc/server/w_fireball.qc @@ -234,7 +234,7 @@ void W_Firemine_Touch (void) { PROJECTILE_TOUCH; if (other.takedamage == DAMAGE_AIM) - if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype | HITTYPE_HEADSHOT) >= 0) + if(Fire_AddDamage(other, self.realowner, autocvar_g_balance_fireball_secondary_damage, autocvar_g_balance_fireball_secondary_damagetime, self.projectiledeathtype) >= 0) { remove(self); return; @@ -410,10 +410,7 @@ float w_fireball(float req) { if(w_deathtype & HITTYPE_SECONDARY) { - if(w_deathtype & HITTYPE_HEADSHOT) - w_deathtypestring = _("%s tried to catch %s's firemine"); - else - w_deathtypestring = _("%s fatefully ignored %s's firemine"); + w_deathtypestring = _("%s fatefully ignored %s's firemine"); } else { diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index a2d3b9887..4031ca8a9 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -14,10 +14,7 @@ void W_MinstaNex_Attack (void) yoda = 0; damage_goodhits = 0; - headshot = 0; - damage_headshotbonus = -1; // no extra damage, just count FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_MINSTANEX); - damage_headshotbonus = 0; if(g_minstagib) { @@ -28,10 +25,6 @@ void W_MinstaNex_Attack (void) { if(yoda && flying) AnnounceTo(self, "yoda"); - if(headshot) - { - AnnounceTo(self, "headshot"); - } if(damage_goodhits && self.minstanex_lasthit) { AnnounceTo(self, "impressive"); diff --git a/qcsrc/server/w_rifle.qc b/qcsrc/server/w_rifle.qc index 1c5f766d7..f707bbd65 100644 --- a/qcsrc/server/w_rifle.qc +++ b/qcsrc/server/w_rifle.qc @@ -5,13 +5,13 @@ REGISTER_WEAPON(RIFLE, w_rifle, IT_NAILS, 7, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_ .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) +void W_Rifle_FireBullet(float pSpread, float pDamage, 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, CH_WEAPON_A, (pDamage + pHeadshotAddedDamage) * pShots); + W_SetupShot (self, autocvar_g_antilag_bullets && pSpeed >= autocvar_g_antilag_bullets, 2, pSound, CH_WEAPON_A, pDamage * pShots); pointparticles(particleeffectnum("rifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1); @@ -22,7 +22,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage } 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); + fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE), 1, pBulletConstant); endFireBallisticBullet(); if (autocvar_g_casings >= 2) @@ -31,12 +31,12 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pHeadshotAddedDamage 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"); + W_Rifle_FireBullet(autocvar_g_balance_rifle_primary_spread, autocvar_g_balance_rifle_primary_damage, 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"); + W_Rifle_FireBullet(autocvar_g_balance_rifle_secondary_spread, autocvar_g_balance_rifle_secondary_damage, 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) @@ -243,17 +243,9 @@ float w_rifle(float req) 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 shot in the head with a rifle by %s"); - else - w_deathtypestring = _("%s was sniped with a rifle by %s"); - } + w_deathtypestring = _("%s was sniped with a rifle by %s"); } } return TRUE; diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index 975449f5d..cd9088e03 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -427,7 +427,7 @@ void Seeker_Tag_Touch() te_knightspike(org2); self.event_damage = func_null; - Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, other.species, self); + Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE | HITTYPE_SECONDARY, other.species, self); if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO) { @@ -624,21 +624,24 @@ float w_seeker(float req) org2 = w_org + w_backoff * 6; if(w_deathtype & HITTYPE_BOUNCE) { - pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); - if(!w_issilent) + if(w_deathtype & HITTYPE_SECONDARY) { - if (w_random<0.15) - sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM); - else if (w_random<0.7) - sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM); - else - sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM); + if(!w_issilent) + sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM); + } + else + { + pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); + if(!w_issilent) + { + if (w_random<0.15) + sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM); + else if (w_random<0.7) + sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM); + else + sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM); + } } - } - else if(w_deathtype & HITTYPE_HEADSHOT) - { - if(!w_issilent) - sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM); } else { diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index fdfa6af38..a4d413970 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -27,7 +27,7 @@ void W_Shotgun_Attack (void) W_SetupShot (self, autocvar_g_antilag_bullets && bulletspeed >= autocvar_g_antilag_bullets, 5, "weapons/shotgun_fire.wav", CH_WEAPON_A, d * bullets); for (sc = 0;sc < bullets;sc = sc + 1) - fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant); + fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, f, WEP_SHOTGUN, 0, 1, bulletconstant); endFireBallisticBullet(); pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, autocvar_g_balance_shotgun_primary_ammo); diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 5f2dc5adb..d8d53f2bf 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -290,8 +290,6 @@ void W_Tuba_NoteOn(float hittype) hittype |= HITTYPE_SECONDARY; if(self.tuba_instrument & 2) hittype |= HITTYPE_BOUNCE; - if(self.tuba_instrument & 4) - hittype |= HITTYPE_HEADSHOT; if(self.tuba_note) { @@ -447,8 +445,6 @@ float w_tuba(float req) instr |= 1; if(w_deathtype & HITTYPE_BOUNCE) instr |= 2; - if(w_deathtype & HITTYPE_HEADSHOT) - instr |= 4; switch(instr) { default: @@ -471,8 +467,6 @@ float w_tuba(float req) instr |= 1; if(w_deathtype & HITTYPE_BOUNCE) instr |= 2; - if(w_deathtype & HITTYPE_HEADSHOT) - instr |= 4; switch(instr) { default: diff --git a/qcsrc/server/w_uzi.qc b/qcsrc/server/w_uzi.qc index 77d8b4aee..525beeaca 100644 --- a/qcsrc/server/w_uzi.qc +++ b/qcsrc/server/w_uzi.qc @@ -52,9 +52,9 @@ void W_UZI_Attack (float deathtype) ATTACK_FINISHED(self) = time + autocvar_g_balance_uzi_first_refire * W_WeaponRateFactor(); if (self.misc_bulletcounter == 1) - fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_headshotaddeddamage, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_first_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_first_damage, autocvar_g_balance_uzi_first_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant); else - fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_sustained_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, deathtype, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -126,7 +126,7 @@ void uzi_mode1_fire_auto() } uzi_spread = bound(autocvar_g_balance_uzi_spread_min, autocvar_g_balance_uzi_spread_min + (autocvar_g_balance_uzi_spread_add * self.misc_bulletcounter), autocvar_g_balance_uzi_spread_max); - fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); self.misc_bulletcounter = self.misc_bulletcounter + 1; @@ -152,7 +152,7 @@ void uzi_mode1_fire_burst() self.punchangle_y = random () - 0.5; } - fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_headshotaddeddamage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant); + fireBallisticBullet(w_shotorg, w_shotdir, autocvar_g_balance_uzi_burst_spread, autocvar_g_balance_uzi_speed, 5, autocvar_g_balance_uzi_sustained_damage, autocvar_g_balance_uzi_sustained_force, WEP_UZI, 0, 1, autocvar_g_balance_uzi_bulletconstant); endFireBallisticBullet(); -- 2.39.2