Remove entities from quadtree at start of loop.
This commit is contained in:
parent
a554c0ef00
commit
4d3b2f10a1
|
@ -69,11 +69,6 @@ void doEntities(void)
|
||||||
|
|
||||||
numAllies = numEnemies = numActiveAllies = numActiveEnemies = 0;
|
numAllies = numEnemies = numActiveAllies = numActiveEnemies = 0;
|
||||||
|
|
||||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
|
||||||
{
|
|
||||||
removeFromQuadtree(e, &battle.quadtree);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev.playerImmortal)
|
if (dev.playerImmortal)
|
||||||
{
|
{
|
||||||
player->health = player->maxHealth;
|
player->health = player->maxHealth;
|
||||||
|
@ -82,6 +77,8 @@ void doEntities(void)
|
||||||
|
|
||||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||||
{
|
{
|
||||||
|
removeFromQuadtree(e, &battle.quadtree);
|
||||||
|
|
||||||
if (dev.allImmortal)
|
if (dev.allImmortal)
|
||||||
{
|
{
|
||||||
e->health = e->maxHealth;
|
e->health = e->maxHealth;
|
||||||
|
|
Loading…
Reference in New Issue