]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make excellent medal configurable
authorz411 <z411@omaera.org>
Tue, 20 Jul 2021 22:26:02 +0000 (18:26 -0400)
committerz411 <z411@omaera.org>
Tue, 20 Jul 2021 22:26:02 +0000 (18:26 -0400)
qcsrc/server/client.qh
qcsrc/server/damage.qc

index bad7f57aaf69f917cfa8c86db65ccae4b936452a..4a358287a8be906de9a9506b8cad670096107b4a 100644 (file)
@@ -62,6 +62,9 @@ string autocvar_g_teamnames_blue;
 string autocvar_g_teamnames_yellow;
 string autocvar_g_teamnames_pink;
 
+// Medals
+float autocvar_g_medals_excellent_time = 2;
+
 // WEAPONTODO
 .string weaponorder_byimpulse;
 
index f40dfc5a25b003699fb3aed15020a5f1af62e0e3..9fab1e792783d8e51a99483ea9a8b109010ef57b 100644 (file)
@@ -391,7 +391,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en
                        }
                        
                        // Excellent check
-                       if(attacker.lastkill && attacker.lastkill > time - 2) {
+                       if(attacker.lastkill && attacker.lastkill > time - autocvar_g_medals_excellent_time) {
                                Give_Medal(attacker, EXCELLENT);
                        }
                        attacker.lastkill = time;