]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/items.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / items.qc
index 0bbf499b5883b7798ddf1bac303caae7cc2a4d64..7d248834f72566af97313317a42a3a50c226f637 100644 (file)
 /// this item is on the ground.
 .bool m_isexpiring;
 
-entity Item_Create(string class_name, vector position)
+entity Item_Create(string class_name, vector position, bool no_align)
 {
        entity item = spawn();
        item.classname = class_name;
        item.spawnfunc_checked = true;
        setorigin(item, position);
+       item.noalign = no_align;
        Item_Initialize(item, class_name);
        if (wasfreed(item))
        {
@@ -83,6 +84,11 @@ void Item_SetLoot(entity item, bool loot)
        item.m_isloot = loot;
 }
 
+bool Item_ShouldKeepPosition(entity item)
+{
+       return item.noalign || (item.spawnflags & 1);
+}
+
 bool Item_IsExpiring(entity item)
 {
        return item.m_isexpiring;