From 2f2ee2a8cd097631fa5bcd9554d190fbfb219863 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 14 Mar 2018 22:42:15 +0000 Subject: [PATCH] Don't kill entity stuck inside another, just remove from quadtree. --- src/world/entities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/world/entities.c b/src/world/entities.c index 8bdc41e..eafd5e8 100644 --- a/src/world/entities.c +++ b/src/world/entities.c @@ -670,11 +670,11 @@ static void moveToOthers(float dx, float dy, PointF *position) { hit = 1; - /* Infinite loop! Kill it! */ + /* infinite loop - remove these from the quadtree */ if (dx == 0 && dy == 0 && solidLoopHits++ > 1) { - self->alive = ALIVE_DEAD; - printf("Warning: Killed stuck entity '%s', stuck in '%s'\n", self->name, e->name); + removeFromQuadtree(self, &world.quadtree); + removeFromQuadtree(e, &world.quadtree); return; } }