this way animations should not possible leak ents
authorStephan Stahl <esteel@eos.franken.de>
Sat, 19 Feb 2011 18:30:26 +0000 (19:30 +0100)
committerStephan Stahl <esteel@eos.franken.de>
Sun, 27 Feb 2011 15:55:07 +0000 (16:55 +0100)
qcsrc/menu/anim/animhost.c

index fc345e4..1d02df5 100644 (file)
@@ -65,6 +65,7 @@ void AnimHost_removeAnim(entity me, entity other)
                n.prevSibling = p;
        else
                me.lastChild = p;
+       remove(other);
 }
 
 void AnimHost_removeAllAnim(entity me)
@@ -141,7 +142,6 @@ void AnimHost_finishAllAnim(entity me)
        {
                tmp = e;
                e = tmp.prevSibling;
-               me.removeAnim(me, tmp);
                tmp.finishAnim(tmp);
        }
 }
@@ -155,7 +155,6 @@ void AnimHost_finishObjAnim(entity me, entity obj)
                {
                        tmp = e;
                        e = tmp.prevSibling;
-                       me.removeAnim(me, tmp);
                        tmp.finishAnim(tmp);
                }
        }
@@ -175,7 +174,6 @@ void AnimHost_tickAll(entity me)
                        tmp = e;
                        e = tmp.prevSibling;
                        me.removeAnim(me, tmp);
-                       remove(tmp);
                }
        }
 }