]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_damage.qc
Put code in place to allow different types of taunts
[voretournament/voretournament.git] / data / qcsrc / server / g_damage.qc
index 6828eab2b296956ce7e036c93fa498e6ac87a663..0041e79dba17cdae1015821b0ee1007e848872c3 100644 (file)
@@ -57,6 +57,7 @@ float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after u
 .entity teamkill_soundsource;\r
 .entity pusher;\r
 .float taunt_soundtime;\r
+.float taunt_soundtype;\r
 \r
 \r
 float IsDifferentTeam(entity a, entity b)\r
@@ -374,6 +375,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                        centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were eaten by ^7", a, GetAdvancedDeathReports(attacker)));\r
                                                }\r
                                                attacker.taunt_soundtime = time + 1;\r
+                                               attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
                                        }\r
                                }\r
                                else\r
@@ -390,6 +392,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                        centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were killed by ^7", a, GetAdvancedDeathReports(attacker)));\r
                                                }\r
                                                attacker.taunt_soundtime = time + 1;\r
+                                               attacker.taunt_soundtype = TAUNTTYPE_DEATH;\r
                                        }\r
                                }\r
 \r
@@ -471,7 +474,12 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        GiveFrags(attacker, targ, 0); // for logging\r
                                }\r
                                else\r
-                                       GiveFrags(attacker, targ, 1);\r
+                               {\r
+                                       if(cvar("g_vore_reversescoring") && deathtype == DEATH_DIGESTION) // reversed vore scoring\r
+                                               GiveFrags(targ, attacker, 1);\r
+                                       else\r
+                                               GiveFrags(attacker, targ, 1);\r
+                               }\r
 \r
                                if (targ.killcount > 2) {\r
                                        if(sv_gentle)\r