Don't show blood if blood is off.
This commit is contained in:
parent
5bc3747198
commit
0f768f593e
|
@ -293,6 +293,8 @@ static void die(void)
|
|||
|
||||
u->dx = (randF() - randF()) * 5;
|
||||
|
||||
if (app.config.blood)
|
||||
{
|
||||
switch (rand() % 3)
|
||||
{
|
||||
case 0:
|
||||
|
@ -308,6 +310,7 @@ static void die(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void animate(void)
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@ extern int rrnd(int low, int high);
|
|||
extern void throwFleshChunks(float x, float y, int amount);
|
||||
extern void updateObjective(char *targetName);
|
||||
|
||||
extern App app;
|
||||
extern Dev dev;
|
||||
extern Entity *self;
|
||||
extern Game game;
|
||||
|
|
|
@ -38,6 +38,8 @@ void addSmallFleshChunk(float x, float y)
|
|||
{
|
||||
Decoration *chunk;
|
||||
|
||||
if (app.config.blood)
|
||||
{
|
||||
chunk = malloc(sizeof(Decoration));
|
||||
memset(chunk, 0, sizeof(Decoration));
|
||||
initFleshChunk(chunk);
|
||||
|
@ -52,6 +54,7 @@ void addSmallFleshChunk(float x, float y)
|
|||
chunk->health = FPS * rrnd(2, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void throwFleshChunks(float x, float y, int amount)
|
||||
{
|
||||
|
|
|
@ -144,7 +144,7 @@ int isSolid(int x, int y)
|
|||
|
||||
void addBloodDecal(int x, int y)
|
||||
{
|
||||
if (isSolid(x, y) && world.map.decal[x][y] == 0)
|
||||
if (app.config.blood && isSolid(x, y) && world.map.decal[x][y] == 0)
|
||||
{
|
||||
world.map.decal[x][y] = (int) rrnd(1, 4);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ extern float limit(float i, float a, float b);
|
|||
extern char *readCompressedFile(const char *filename);
|
||||
extern int rrnd(int low, int high);
|
||||
|
||||
extern App app;
|
||||
extern Camera camera;
|
||||
extern World world;
|
||||
|
||||
|
|
Loading…
Reference in New Issue