Activate / deactivate nodes as well as jumpgate.
This commit is contained in:
parent
e7bfeef2cd
commit
3593832a76
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue