X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Foo.qh;fp=qcsrc%2Flib%2Foo.qh;h=9048202fe28f1da4b5ce0fb753cda1b6aca830b1;hb=81df9076546717a7aa7c46bb894fcf2b7dc8e30a;hp=a2cef664bad3b72f9936ab371b12087c1e362027;hpb=74ae9d49fce8a7363efee2c825688ac2aa96d8cf;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/oo.qh b/qcsrc/lib/oo.qh index a2cef664b..9048202fe 100644 --- a/qcsrc/lib/oo.qh +++ b/qcsrc/lib/oo.qh @@ -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); \