In epic battles, spawned in entities (such as swarmers) don't count towards the epicLimit.
This commit is contained in:
parent
6ca888d775
commit
d33bcf9414
|
@ -63,6 +63,7 @@ void doEntities(void)
|
|||
{
|
||||
int numAllies, numEnemies;
|
||||
int numActiveAllies, numActiveEnemies;
|
||||
int numSpawnedEnemies;
|
||||
Entity *e, *prev;
|
||||
|
||||
prev = &battle.entityHead;
|
||||
|
@ -217,6 +218,11 @@ void doEntities(void)
|
|||
if (e->health > 0 && e->active)
|
||||
{
|
||||
numActiveEnemies++;
|
||||
|
||||
if (e->spawned)
|
||||
{
|
||||
numSpawnedEnemies++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +235,8 @@ void doEntities(void)
|
|||
|
||||
if (battle.isEpic && battle.stats[STAT_TIME] % FPS == 0)
|
||||
{
|
||||
numActiveEnemies -= numSpawnedEnemies;
|
||||
|
||||
if (numAllies > battle.epicFighterLimit)
|
||||
{
|
||||
activateEpicFighters(battle.epicFighterLimit - numActiveAllies, SIDE_ALLIES);
|
||||
|
|
|
@ -40,7 +40,10 @@ void doSpawners(void)
|
|||
s->total -= num;
|
||||
}
|
||||
|
||||
battle.numInitialEnemies += num;
|
||||
if (s->side != SIDE_ALLIES)
|
||||
{
|
||||
battle.numInitialEnemies += num;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < num ; i++)
|
||||
{
|
||||
|
@ -48,6 +51,8 @@ void doSpawners(void)
|
|||
|
||||
e = spawnFighter(type, 0, 0, s->side);
|
||||
|
||||
e->spawned = 1;
|
||||
|
||||
if (s->offscreen)
|
||||
{
|
||||
e->x = player->x;
|
||||
|
|
|
@ -100,6 +100,7 @@ struct Entity {
|
|||
char defName[MAX_NAME_LENGTH];
|
||||
char groupName[MAX_NAME_LENGTH];
|
||||
int active;
|
||||
int spawned;
|
||||
int id;
|
||||
int side;
|
||||
float x;
|
||||
|
|
Loading…
Reference in New Issue