From 7e85dac05216ab307e7801cfc3667d5a9f2250c9 Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Thu, 17 Jul 2014 07:30:13 +1000 Subject: [PATCH] Remove check for modified sprites... ...when generating extra blood splats. It wasn't working correctly, and is better without. --- src/p_mobj.c | 41 +++++++++++++++++++---------------------- src/p_spec.c | 2 +- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 501540b4bd..97e0f6ccbf 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -923,32 +923,29 @@ void P_SpawnMapThing(mapthing_t *mthing) if ((corpses & MOREBLOOD) && bloodsplats) { - short lump = sprites[mobj->sprite].spriteframes[0].lump[0]; - - if (sproffsets[lump].canmodify) + if ((mobjinfo[i].flags2 & MF2_MOREREDBLOODSPLATS) + || (FREEDOOM && (mobjinfo[i].flags2 & MF2_MOREBLUEBLOODSPLATS))) { - if ((mobjinfo[i].flags2 & MF2_MOREREDBLOODSPLATS) - || (FREEDOOM && (mobjinfo[i].flags2 & MF2_MOREBLUEBLOODSPLATS))) - { - int radius = ((spritewidth[lump] >> FRACBITS) >> 1) + 8; + short lump = sprites[mobj->sprite].spriteframes[0].lump[0]; + int radius = ((spritewidth[lump] >> FRACBITS) >> 1) + 8; - for (i = 0; i < M_RandomInt(100, 150); i++) - { - bloodSplatSpawner(mobj->x + (M_RandomInt(-radius, radius) << FRACBITS), - mobj->y + (M_RandomInt(-radius, radius) << FRACBITS), - MF2_TRANSLUCENT_50, tl50colfunc); - } - } - else if (mobjinfo[i].flags2 & MF2_MOREBLUEBLOODSPLATS) + for (i = 0; i < M_RandomInt(100, 150); i++) { - int radius = ((spritewidth[lump] >> FRACBITS) >> 1) + 8; + bloodSplatSpawner(mobj->x + (M_RandomInt(-radius, radius) << FRACBITS), + mobj->y + (M_RandomInt(-radius, radius) << FRACBITS), + MF2_TRANSLUCENT_50, tl50colfunc); + } + } + else if (mobjinfo[i].flags2 & MF2_MOREBLUEBLOODSPLATS) + { + short lump = sprites[mobj->sprite].spriteframes[0].lump[0]; + int radius = ((spritewidth[lump] >> FRACBITS) >> 1) + 8; - for (i = 0; i < M_RandomInt(100, 150); i++) - { - bloodSplatSpawner(mobj->x + (M_RandomInt(-radius, radius) << FRACBITS), - mobj->y + (M_RandomInt(-radius, radius) << FRACBITS), - MF2_TRANSLUCENT_REDTOBLUE_33, tlredtoblue33colfunc); - } + for (i = 0; i < M_RandomInt(100, 150); i++) + { + bloodSplatSpawner(mobj->x + (M_RandomInt(-radius, radius) << FRACBITS), + mobj->y + (M_RandomInt(-radius, radius) << FRACBITS), + MF2_TRANSLUCENT_REDTOBLUE_33, tlredtoblue33colfunc); } } } diff --git a/src/p_spec.c b/src/p_spec.c index 955bb93156..82a6de2547 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -128,7 +128,7 @@ void P_InitPicAnims(void) int size = (numflats + 1) * sizeof(boolean); isliquid = (boolean *)Z_Malloc(size, PU_STATIC, 0); - memset(isliquid, 0, size); + memset(isliquid, false, size); // Init animation lastanim = anims;