]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/intrusivelist.qh
Implement a qc version of copyentity that clears intrusive list data from the copied...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / intrusivelist.qh
index 938a7f9630dd421e80675ddaa9c0ec379b89aad6..3dee9ca38823011ee7fc27313efcf23d01480f4e 100644 (file)
@@ -268,6 +268,15 @@ void IL_ENDFRAME()
 #endif
 }
 
+// clears any IL data from an entity (not an intrusive list)
+// it should be used only in very particular cases such as after a copyentity call
+void IL_REMOVE_RAW(entity it)
+{
+       it.il_lists = '0 0 0';
+       for (int i = 0; i < IL_MAX * 2; ++i)
+               it.il_links_flds[i] = nil;
+}
+
 // called when an entity is deleted with delete() / remove()
 // or when a player disconnects
 void ONREMOVE(entity this)