]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Map target_fragsFilter to trigger_counter
authorMario <zacjardine@y7mail.com>
Sun, 16 Sep 2018 03:49:18 +0000 (13:49 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 16 Sep 2018 03:49:18 +0000 (13:49 +1000)
qcsrc/common/mapobjects/trigger/counter.qh
qcsrc/server/compat/quake3.qc

index 394d15472cdbc68f289b9476ec00311e6dd22e09..9edf776b36509b5c4dc58fc4c75bc19c57c83526 100644 (file)
@@ -1,4 +1,7 @@
 #pragma once
 
+#ifdef SVQC
+spawnfunc(trigger_counter);
+#endif
 
 const int COUNTER_FIRE_AT_COUNT = BIT(2);
index 4511100581b7d74a89f45e955292f74ce45d04a7..a217f05b52e2c0fa56a6bed42bad95ca1bc825fd 100644 (file)
@@ -6,6 +6,7 @@
 #include <server/resources.qh>
 #include <common/t_items.qh>
 #include <common/mapobjects/triggers.qh>
+#include <common/mapobjects/trigger/counter.qh>
 #include <common/weapons/_all.qh>
 
 //***********************
@@ -183,6 +184,13 @@ spawnfunc(target_give)
        InitializeEntity(this, target_give_init, INITPRIO_FINDTARGET);
 }
 
+
+spawnfunc(target_fragsFilter)
+{
+       this.count = this.frags;
+       spawnfunc_trigger_counter(this);
+}
+
 //spawnfunc(item_flight)       /* handled by buffs mutator */
 //spawnfunc(item_haste)        /* handled by buffs mutator */
 //spawnfunc(item_health)       /* handled in t_quake.qc */