From 712a2c47b9f3ed86b46e3d7110ab35f725ad40a4 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 9 Feb 2018 21:54:12 +0000 Subject: [PATCH] Fix for grenade blob / droid attacks. --- src/entities/evilBlobs/grenadeBlob.c | 3 +++ src/entities/eyeDroids/grenadeDroid.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/entities/evilBlobs/grenadeBlob.c b/src/entities/evilBlobs/grenadeBlob.c index d36f74c..3f6f011 100644 --- a/src/entities/evilBlobs/grenadeBlob.c +++ b/src/entities/evilBlobs/grenadeBlob.c @@ -39,6 +39,7 @@ Entity *initGrenadeBlob(void) u->sprite[FACING_DIE] = getSprite("GrenadeBlobSpin"); u->weaponType = WPN_GRENADES; + u->maxShotsToFire = 1; superPreFire = u->preFire; @@ -61,10 +62,12 @@ static void preFire(void) if (rand() % 100 < 25) { u->weaponType = WPN_AIMED_PISTOL; + u->maxShotsToFire = 3; } else { u->weaponType = WPN_GRENADES; + u->maxShotsToFire = 1; } } } diff --git a/src/entities/eyeDroids/grenadeDroid.c b/src/entities/eyeDroids/grenadeDroid.c index 29cc77f..d277fbb 100644 --- a/src/entities/eyeDroids/grenadeDroid.c +++ b/src/entities/eyeDroids/grenadeDroid.c @@ -39,6 +39,7 @@ Entity *initGrenadeDroid(void) u->sprite[FACING_DIE] = getSprite("GrenadeDroidDie"); u->weaponType = WPN_GRENADES; + u->maxShotsToFire = 1; superPreFire = u->preFire; @@ -61,10 +62,12 @@ static void preFire(void) if (rand() % 100 < 25) { u->weaponType = WPN_AIMED_PISTOL; + u->maxShotsToFire = 3; } else { u->weaponType = WPN_GRENADES; + u->maxShotsToFire = 1; } } }