Don't add enemies if noEnemies flag set.
This commit is contained in:
parent
0e71bcc88f
commit
9f100106eb
|
@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
void initAtlasTest(void)
|
void initAtlasTest(void)
|
||||||
{
|
{
|
||||||
|
dev.cheatNoEnemies = 1;
|
||||||
|
|
||||||
initGame();
|
initGame();
|
||||||
|
|
||||||
initHub();
|
initHub();
|
||||||
|
|
|
@ -27,3 +27,4 @@ extern void initGame(void);
|
||||||
extern void initEntities(void);
|
extern void initEntities(void);
|
||||||
extern void loadWorld(char *filename);
|
extern void loadWorld(char *filename);
|
||||||
|
|
||||||
|
extern Dev dev;
|
||||||
|
|
|
@ -166,6 +166,11 @@ static void loadEntities(cJSON *root)
|
||||||
self->init();
|
self->init();
|
||||||
|
|
||||||
self->animate();
|
self->animate();
|
||||||
|
|
||||||
|
if (self->type == ET_ENEMY && dev.cheatNoEnemies)
|
||||||
|
{
|
||||||
|
self->alive = ALIVE_DEAD;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,6 @@ extern char *readFile(const char *filename);
|
||||||
extern void loadSprite(cJSON *root);
|
extern void loadSprite(cJSON *root);
|
||||||
extern Entity *createEntity(char *typeStr);
|
extern Entity *createEntity(char *typeStr);
|
||||||
|
|
||||||
|
extern Dev dev;
|
||||||
extern Entity *self;
|
extern Entity *self;
|
||||||
extern World world;
|
extern World world;
|
||||||
|
|
Loading…
Reference in New Issue