Grenade droid init fixes.

This commit is contained in:
Steve 2018-02-09 08:38:02 +00:00
parent 76dda670bf
commit acb00a7d95
2 changed files with 10 additions and 1 deletions

View File

@ -24,10 +24,16 @@ static void (*superPreFire)(void);
static void preFire(void);
static int canFire(Entity *target);
void initGrenadeDroid(Unit *u)
Entity *initGrenadeDroid(void)
{
Unit *u;
u = createUnit();
initEyeDroid(u);
u->unitType = "GrenadeEyeDroid";
u->sprite[FACING_LEFT] = getSprite("GrenadeDroidLeft");
u->sprite[FACING_RIGHT] = getSprite("GrenadeDroidRight");
u->sprite[FACING_DIE] = getSprite("GrenadeDroidDie");
@ -38,6 +44,8 @@ void initGrenadeDroid(Unit *u)
u->preFire = preFire;
u->canFire = canFire;
return (Entity*)u;
}
static void preFire(void)

View File

@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../../common.h"
extern Unit *createUnit(void);
extern void initEyeDroid(Unit *u);
extern Sprite *getSprite(char *name);