increase headshot damage on rifle, use the headshot image in the notify panel if...
authorFruitieX <fruitiex@gmail.com>
Sun, 7 Nov 2010 21:13:46 +0000 (23:13 +0200)
committerFruitieX <fruitiex@gmail.com>
Sun, 7 Nov 2010 21:13:46 +0000 (23:13 +0200)
balanceXonotic.cfg
qcsrc/client/hud.qc
qcsrc/common/constants.qh

index f0f4d85..aa883a2 100644 (file)
@@ -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
index d657510..9a203c7 100644 (file)
@@ -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";
index 29029f6..9eb7a16 100644 (file)
@@ -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;