Implemented updateEntitySide().
This commit is contained in:
parent
c17f1af851
commit
c090942f81
|
@ -665,8 +665,20 @@ void killEntity(char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateEntitySide(char *side, char *entity)
|
void updateEntitySide(char *sideStr, char *name)
|
||||||
{
|
{
|
||||||
|
Entity *e;
|
||||||
|
int side;
|
||||||
|
|
||||||
|
side = lookup(sideStr);
|
||||||
|
|
||||||
|
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||||
|
{
|
||||||
|
if (strcmp(e->name, name) == 0)
|
||||||
|
{
|
||||||
|
e->side = side;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroyEntities(void)
|
void destroyEntities(void)
|
||||||
|
|
|
@ -36,6 +36,7 @@ extern void addToQuadtree(Entity *e, Quadtree *root);
|
||||||
extern void updateCapitalShipComponentProperties(Entity *parent, long flags);
|
extern void updateCapitalShipComponentProperties(Entity *parent, long flags);
|
||||||
extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
extern int isOnBattleScreen(int x, int y, int w, int h);
|
||||||
|
extern long lookup(char *name);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
Loading…
Reference in New Issue