]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/buffs.qc
Rough support for buff timers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / buffs.qc
index 89e2d80be84d40150f6fe4df8ca8d85fc43b747d..9348e119a6842968f00257c98d49c4a30fa6b581 100644 (file)
@@ -71,3 +71,12 @@ string Buff_Sprite(int buff_id)
                        return e.model2;
        return "";
 }
+
+float Buff_Timer(int buff_id)
+{
+       entity e;
+       for(e = Buff_Type_first; e; e = e.enemy)
+               if(buff_id == e.items)
+                       return e.buff_time;
+       return 0;
+}