Grenade droid init fixes.
This commit is contained in:
parent
76dda670bf
commit
acb00a7d95
|
@ -24,10 +24,16 @@ static void (*superPreFire)(void);
|
||||||
static void preFire(void);
|
static void preFire(void);
|
||||||
static int canFire(Entity *target);
|
static int canFire(Entity *target);
|
||||||
|
|
||||||
void initGrenadeDroid(Unit *u)
|
Entity *initGrenadeDroid(void)
|
||||||
{
|
{
|
||||||
|
Unit *u;
|
||||||
|
|
||||||
|
u = createUnit();
|
||||||
|
|
||||||
initEyeDroid(u);
|
initEyeDroid(u);
|
||||||
|
|
||||||
|
u->unitType = "GrenadeEyeDroid";
|
||||||
|
|
||||||
u->sprite[FACING_LEFT] = getSprite("GrenadeDroidLeft");
|
u->sprite[FACING_LEFT] = getSprite("GrenadeDroidLeft");
|
||||||
u->sprite[FACING_RIGHT] = getSprite("GrenadeDroidRight");
|
u->sprite[FACING_RIGHT] = getSprite("GrenadeDroidRight");
|
||||||
u->sprite[FACING_DIE] = getSprite("GrenadeDroidDie");
|
u->sprite[FACING_DIE] = getSprite("GrenadeDroidDie");
|
||||||
|
@ -38,6 +44,8 @@ void initGrenadeDroid(Unit *u)
|
||||||
|
|
||||||
u->preFire = preFire;
|
u->preFire = preFire;
|
||||||
u->canFire = canFire;
|
u->canFire = canFire;
|
||||||
|
|
||||||
|
return (Entity*)u;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void preFire(void)
|
static void preFire(void)
|
||||||
|
|
|
@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
|
|
||||||
|
extern Unit *createUnit(void);
|
||||||
extern void initEyeDroid(Unit *u);
|
extern void initEyeDroid(Unit *u);
|
||||||
extern Sprite *getSprite(char *name);
|
extern Sprite *getSprite(char *name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue