Start of extra blood / explosions.
This commit is contained in:
parent
d2bc37eebf
commit
18fa11d278
|
@ -110,7 +110,7 @@ static void tick(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
addSmokeParticles(b->x + (b->w / 2), b->y);
|
||||
addSmokeParticles(b->x + (b->w / 2), b->y, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ extern Sprite *getSprite(char *name);
|
|||
extern void playMusic(int loop);
|
||||
extern void addTeleportStars(Entity *e);
|
||||
extern float limit(float i, float a, float b);
|
||||
extern void addSmokeParticles(float x, float y);
|
||||
extern void addSmokeParticles(float x, float y, int rising);
|
||||
extern int rrnd(int low, int high);
|
||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
||||
extern int enemyCanSeePlayer(Entity *e);
|
||||
|
|
|
@ -54,11 +54,11 @@ static void action(void)
|
|||
|
||||
if (d->effectType == 0)
|
||||
{
|
||||
addFlameParticles(d->x + (rand() % d->w), d->y + (rand() % d->h));
|
||||
addFlameParticles(d->x + (rand() % d->w), d->y + (rand() % d->h), d->isOnGround);
|
||||
}
|
||||
else
|
||||
{
|
||||
addSmokeParticles(d->x + (rand() % d->w), d->y + (rand() % d->h));
|
||||
addSmokeParticles(d->x + (rand() % d->w), d->y + (rand() % d->h), d->isOnGround);
|
||||
}
|
||||
|
||||
self->thinkTime = 1;
|
||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "../../common.h"
|
||||
|
||||
extern void initEntity(Entity *e);
|
||||
extern void addFlameParticles(float x, float y);
|
||||
extern void addSmokeParticles(float x, float y);
|
||||
extern void addFlameParticles(float x, float y, int rising);
|
||||
extern void addSmokeParticles(float x, float y, int rising);
|
||||
|
||||
extern Entity *self;
|
||||
|
|
|
@ -57,7 +57,7 @@ static void action(void)
|
|||
|
||||
d = (Decoration*)self;
|
||||
|
||||
if (d->bleedTime > 0)
|
||||
if (d->bleedTime > 0 || app.config.blood == 2)
|
||||
{
|
||||
addBlood(d->x + (rand() % d->w), d->y + (rand() % d->h));
|
||||
}
|
||||
|
|
|
@ -23,4 +23,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
extern void initEntity(Entity *e);
|
||||
extern void addBlood(float x, float y);
|
||||
|
||||
extern App app;
|
||||
extern Entity *self;
|
||||
|
|
|
@ -57,7 +57,7 @@ static void tick(void)
|
|||
|
||||
if (u->alive == ALIVE_DYING)
|
||||
{
|
||||
addSmokeParticles(u->x + (u->w / 2), u->y);
|
||||
addSmokeParticles(u->x + (u->w / 2), u->y, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ extern void addRandomItems(int x, int y);
|
|||
extern int rrnd(int low, int high);
|
||||
extern void addExplosion(float x, float y, int radius, Entity *owner);
|
||||
extern void throwDebris(float x, float y, int amount);
|
||||
extern void addSmokeParticles(float x, float y);
|
||||
extern void addSmokeParticles(float x, float y, int rising);
|
||||
extern void addScorchDecal(int x, int y);
|
||||
extern Unit *createUnit(void);
|
||||
extern void playBattleSound(int snd, int ch, int x, int y);
|
||||
|
|
|
@ -46,12 +46,19 @@ void addSmallFleshChunk(float x, float y)
|
|||
chunk->y = y;
|
||||
chunk->health = FPS / 4;
|
||||
chunk->sprite[0] = chunk->sprite[1] = chunk->sprite[2] = fleshChunk[0];
|
||||
|
||||
if (app.config.blood == 2)
|
||||
{
|
||||
chunk->health = FPS * rrnd(2, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void throwFleshChunks(float x, float y, int amount)
|
||||
{
|
||||
int i;
|
||||
Decoration *chunk;
|
||||
|
||||
amount *= app.config.blood;
|
||||
|
||||
for (i = 0; i < amount; i++)
|
||||
{
|
||||
|
@ -66,6 +73,11 @@ void throwFleshChunks(float x, float y, int amount)
|
|||
chunk->dy = -rrnd(10, 15);
|
||||
chunk->health = FPS * rrnd(3, 12);
|
||||
chunk->sprite[0] = chunk->sprite[1] = chunk->sprite[2] = fleshChunk[i % 3];
|
||||
|
||||
if (app.config.blood == 2)
|
||||
{
|
||||
chunk->health = FPS * rrnd(FPS, FPS * 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +97,12 @@ void throwDebris(float x, float y, int amount)
|
|||
piece->dx = rrnd(-20, 20);
|
||||
piece->dx /= 10;
|
||||
piece->dy = -rrnd(10, 15);
|
||||
piece->health = FPS * (rand() % 3);
|
||||
piece->health = FPS * rrnd(1, 3);
|
||||
piece->sprite[0] = piece->sprite[1] = piece->sprite[2] = debris[i % 3];
|
||||
|
||||
if (app.config.blood == 2)
|
||||
{
|
||||
piece->health = FPS * rrnd(FPS / 2, FPS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,3 +25,4 @@ extern Sprite *getSprite(char *name);
|
|||
extern void initFleshChunk(Decoration *d);
|
||||
extern void initDebris(Decoration *d);
|
||||
|
||||
extern App app;
|
||||
|
|
|
@ -146,7 +146,7 @@ void addSparkParticles(float x, float y)
|
|||
}
|
||||
}
|
||||
|
||||
void addSmokeParticles(float x, float y)
|
||||
void addSmokeParticles(float x, float y, int rising)
|
||||
{
|
||||
Particle *p;
|
||||
|
||||
|
@ -162,7 +162,7 @@ void addSmokeParticles(float x, float y)
|
|||
p->destroyAfterAnim = 1;
|
||||
}
|
||||
|
||||
void addFlameParticles(float x, float y)
|
||||
void addFlameParticles(float x, float y, int rising)
|
||||
{
|
||||
Particle *p;
|
||||
|
||||
|
|
Loading…
Reference in New Issue