Always add to quadtree if not dead or teleporting.

This commit is contained in:
Steve 2018-02-16 08:08:52 +00:00
parent 0a2cd17622
commit 6f69f9a56a
2 changed files with 4 additions and 8 deletions

View File

@ -228,17 +228,13 @@ void doEntities(void)
self->spriteFrame = 0; self->spriteFrame = 0;
self->die(); self->die();
} }
}
if (!(self->flags & (EF_TELEPORTING | EF_GONE))) if (!(self->flags & (EF_TELEPORTING | EF_GONE)))
{ {
addToQuadtree(self, &world.quadtree); addToQuadtree(self, &world.quadtree);
} }
} }
else if (self->alive == ALIVE_DYING)
{
addToQuadtree(self, &world.quadtree);
}
}
prev = self; prev = self;
} }

View File

@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h" #include "../common.h"
#define MAX_RIDERS 64 #define MAX_RIDERS 256
#define MAX_TOUCHED 64 #define MAX_TOUCHED 256
extern Texture *getTexture(const char *filename); extern Texture *getTexture(const char *filename);
extern void blitRect(SDL_Texture *texture, int x, int y, SDL_Rect *srcRect, int center); extern void blitRect(SDL_Texture *texture, int x, int y, SDL_Rect *srcRect, int center);