Don't add enemies if noEnemies flag set.

This commit is contained in:
Steve 2018-02-09 07:42:10 +00:00
parent 0e71bcc88f
commit 9f100106eb
4 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void initAtlasTest(void)
{
dev.cheatNoEnemies = 1;
initGame();
initHub();

View File

@ -27,3 +27,4 @@ extern void initGame(void);
extern void initEntities(void);
extern void loadWorld(char *filename);
extern Dev dev;

View File

@ -166,6 +166,11 @@ static void loadEntities(cJSON *root)
self->init();
self->animate();
if (self->type == ET_ENEMY && dev.cheatNoEnemies)
{
self->alive = ALIVE_DEAD;
}
}
}

View File

@ -25,5 +25,6 @@ extern char *readFile(const char *filename);
extern void loadSprite(cJSON *root);
extern Entity *createEntity(char *typeStr);
extern Dev dev;
extern Entity *self;
extern World world;