]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/oo.qh
Merge branch 'pending-release' into Mario/survival
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / oo.qh
index a2cef664bad3b72f9936ab371b12087c1e362027..9048202fe28f1da4b5ce0fb753cda1b6aca830b1 100644 (file)
@@ -77,6 +77,13 @@ ACCUMULATE void ONREMOVE(entity this) {}
     /* this = NULL; */  \
 MACRO_END
 
+void IL_REMOVE_RAW(entity it);
+void copyentity_qc(entity src, entity dst)
+{
+       copyentity(src, dst); // builtin function
+       IL_REMOVE_RAW(dst);
+}
+
 entity _clearentity_ent;
 STATIC_INIT(clearentity)
 {
@@ -88,7 +95,7 @@ void clearentity(entity e)
                int n = e.entnum;
 #endif
        bool was_pure = is_pure(e);
-       copyentity(_clearentity_ent, e);
+       copyentity_qc(_clearentity_ent, e);
        if (!was_pure) make_impure(e);
 #ifdef CSQC
                e.entnum = n;
@@ -175,7 +182,7 @@ void clearentity(entity e)
        {                                                                                              \
                if (cname##_vtbl && !this.transmute)                                                       \
                {                                                                                          \
-                       copyentity(cname##_vtbl, this);                                                        \
+                       copyentity_qc(cname##_vtbl, this);                                                     \
                        return;                                                                                \
                }                                                                                          \
                spawn##base##_static(this);                                                                \