Skip to content

Commit

Permalink
Remove check for modified sprites...
Browse files Browse the repository at this point in the history
...when generating extra blood splats. It wasn't working correctly, and
is better without.
  • Loading branch information
bradharding committed Jul 16, 2014
1 parent 63f028a commit 7e85dac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
41 changes: 19 additions & 22 deletions src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/p_spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7e85dac

Please sign in to comment.