]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_damage.qc
Better balancing with the new taunts.
[voretournament/voretournament.git] / data / qcsrc / server / g_damage.qc
index 9c7bce0a8b71186391c02e97fae3c58d4eeef0f4..483ff0c7347dc4f7c9c3c29a595e8f9e5e11bb27 100644 (file)
@@ -56,8 +56,15 @@ float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after u
 .float teamkill_soundtime;\r
 .entity teamkill_soundsource;\r
 .entity pusher;\r
+\r
 .float taunt_soundtime;\r
+.float taunt_soundtype;\r
 \r
+void SetAutoTaunt(entity e, float t_soundtime, float soundtype)\r
+{\r
+       e.taunt_soundtime = t_soundtime;\r
+       e.taunt_soundtype = soundtype;\r
+}\r
 \r
 float IsDifferentTeam(entity a, entity b)\r
 {\r
@@ -373,7 +380,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                        centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You ate ^7", s, GetAdvancedDeathReports(targ)));\r
                                                        centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were eaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
                                                }\r
-                                               attacker.taunt_soundtime = time + 1;\r
+                                               SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH);\r
                                        }\r
                                }\r
                                else\r
@@ -389,7 +396,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                        centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You killed ^7", s, GetAdvancedDeathReports(targ)));\r
                                                        centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were killed by ^7", a, GetAdvancedDeathReports(attacker)));\r
                                                }\r
-                                               attacker.taunt_soundtime = time + 1;\r
+                                               SetAutoTaunt(attacker, time + 1, TAUNTTYPE_DEATH);\r
                                        }\r
                                }\r
 \r