Always add ents to quadtree, to allow AI to see components. Shuffle around later.

This commit is contained in:
Steve 2016-04-15 13:08:30 +01:00
parent 5e58f09fcf
commit b40936fd79
1 changed files with 8 additions and 9 deletions

View File

@ -161,11 +161,8 @@ void doEntities(void)
e->x += e->dx;
e->y += e->dy;
if (!isComponent(e))
{
addToQuadtree(e, &battle.quadtree);
}
}
else
{
if (e == battle.entityTail)
@ -332,6 +329,8 @@ static void alignComponents(void)
{
if (isComponent(e))
{
removeFromQuadtree(e, &battle.quadtree);
s = sin(TO_RAIDANS(e->owner->angle));
c = cos(TO_RAIDANS(e->owner->angle));