Activate / deactivate nodes as well as jumpgate.

This commit is contained in:
Steve 2016-05-17 13:49:33 +01:00
parent e7bfeef2cd
commit 3593832a76
1 changed files with 14 additions and 6 deletions

View File

@ -130,15 +130,23 @@ int jumpgateEnabled(void)
void activateJumpgate(int activate)
{
Entity *e;
if (battle.jumpgate && battle.jumpgate->health > 1)
{
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
{
if (e == battle.jumpgate || e->owner == battle.jumpgate)
{
if (activate)
{
battle.jumpgate->flags &= ~EF_DISABLED;
e->flags &= ~EF_DISABLED;
}
else
{
battle.jumpgate->flags |= EF_DISABLED;
e->flags |= EF_DISABLED;
}
}
}
}
}