Don't kill entity stuck inside another, just remove from quadtree.
This commit is contained in:
parent
370adf36b6
commit
2f2ee2a8cd
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue