]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/items.qc
Completely removed droppedweapon.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / items.qc
index 6a0593282ff0beb973973c32d469107ed6fefaef..1265f71c5e6cdb5cbf04a35037792828fdc31c9d 100644 (file)
@@ -5,11 +5,13 @@
 /// game items.
 /// \copyright GNU GPLv2 or any later version.
 
-#include <common/mutators/mutator/instagib/sv_instagib.qh>
-#include <common/mutators/mutator/overkill/hmg.qh>
-#include <common/mutators/mutator/overkill/rpc.qh>
+#include "g_subs.qh"
+#include <common/weapons/all.qh>
 
 .bool m_isloot; ///< Holds whether item is loot.
+/// \brief Holds whether strength, shield or superweapon timers expire while
+/// this item is on the ground.
+.bool m_isexpiring;
 
 entity Item_Create(string class_name, vector position)
 {
@@ -73,7 +75,7 @@ bool Item_InitializeLoot(entity item, string class_name, vector position,
 
 bool Item_IsLoot(entity item)
 {
-       return item.m_isloot || (item.classname == "droppedweapon");
+       return item.m_isloot;
 }
 
 void Item_SetLoot(entity item, bool loot)
@@ -81,6 +83,16 @@ void Item_SetLoot(entity item, bool loot)
        item.m_isloot = loot;
 }
 
+bool Item_IsExpiring(entity item)
+{
+       return item.m_isexpiring;
+}
+
+void Item_SetExpiring(entity item, bool expiring)
+{
+       item.m_isexpiring = expiring;
+}
+
 // Compatibility spawn functions
 
 // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard