From f5d70dcb0e890df1a5b32076db0736a2f32b6dc8 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sun, 7 Nov 2010 23:13:46 +0200 Subject: [PATCH] increase headshot damage on rifle, use the headshot image in the notify panel if player was killed by a headshot --- balanceXonotic.cfg | 4 ++-- qcsrc/client/hud.qc | 15 ++++++++++++--- qcsrc/common/constants.qh | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index f0f4d856e9..aa883a2daf 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -581,7 +581,7 @@ set g_balance_campingrifle_auto_reload_after_changing_weapons 0 set g_balance_campingrifle_bursttime 0 set g_balance_campingrifle_primary_tracer 1 set g_balance_campingrifle_primary_damage 75 -set g_balance_campingrifle_primary_headshotaddeddamage 75 +set g_balance_campingrifle_primary_headshotaddeddamage 125 set g_balance_campingrifle_primary_spread 0 set g_balance_campingrifle_primary_force 2 set g_balance_campingrifle_primary_speed 40000 @@ -595,7 +595,7 @@ set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot set g_balance_campingrifle_secondary 1 set g_balance_campingrifle_secondary_tracer 0 set g_balance_campingrifle_secondary_damage 50 -set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head +set g_balance_campingrifle_secondary_headshotaddeddamage 75 set g_balance_campingrifle_secondary_spread 0 set g_balance_campingrifle_secondary_force 2 set g_balance_campingrifle_secondary_speed 20000 diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index d6575102ab..9a203c72b5 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2643,9 +2643,14 @@ 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)) { - HUD_KillNotify_Push(s1, s2, 1, type); - if (alsoprint) - print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer + if(type & HITTYPE_HEADSHOT) + HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT); + else + { + HUD_KillNotify_Push(s1, s2, 1, type); + if (alsoprint) + print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer + } } else if(type == KILL_TEAM_RED || type == KILL_TEAM_BLUE || type == KILL_TEAM_SPREE) { HUD_KillNotify_Push(s1, s2, 1, type); @@ -3273,6 +3278,10 @@ void HUD_Notify (void) { s = "notify_void"; } + else if(killnotify_deathtype[j] == DEATH_HEADSHOT) + { + s = "notify_headshot"; + } else if(killnotify_deathtype[j] == RACE_SERVER_RECORD) { s = "race_newrecordserver"; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 29029f6e45..9eb7a1610e 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -508,6 +508,7 @@ float DEATH_CHEAT = 10016; float DEATH_FIRE = 10017; float DEATH_TURRET = 10020; float DEATH_QUIET = 10021; +float DEATH_HEADSHOT = 10022; float DEATH_SBMINIGUN = 10030; float DEATH_SBROCKET = 10031; -- 2.39.2