cl_bloodtype could break playsim sync

Corrected entries were blood would spawn inconsistently because of
cl_bloodtype. Blood now always spawns but is marked invisible according
to cl_bloodtype.
This commit is contained in:
Edward Richardson 2013-12-01 22:06:48 +13:00
commit 662bc7a3ac
3 changed files with 19 additions and 13 deletions

View file

@ -4874,7 +4874,7 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1)
if (bloodcls != NULL)
{
z += pr_spawnblood.Random2 () << 10;
th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement
@ -4945,7 +4945,7 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc
}
statedone:
if (!(bloodtype <= 1)) th->renderflags |= RF_INVISIBLE;
if (bloodtype >= 1)
P_DrawSplash2 (40, x, y, z, dir, 2, bloodcolor);
}
@ -4966,7 +4966,7 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1)
if (bloodcls != NULL)
{
AActor *mo;
@ -4981,6 +4981,8 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
{
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
if (!(bloodtype <= 1)) mo->renderflags |= RF_INVISIBLE;
}
if (bloodtype >= 1)
{
@ -5004,7 +5006,7 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1)
if (bloodcls != NULL)
{
AActor *mo;
@ -5019,6 +5021,8 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
{
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
if (!(bloodtype <= 1)) mo->renderflags |= RF_INVISIBLE;
}
if (bloodtype >= 1)
{
@ -5047,7 +5051,7 @@ void P_RipperBlood (AActor *mo, AActor *bleeder)
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1)
if (bloodcls != NULL)
{
AActor *th;
th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement
@ -5064,6 +5068,8 @@ void P_RipperBlood (AActor *mo, AActor *bleeder)
{
th->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
if (!(bloodtype <= 1)) th->renderflags |= RF_INVISIBLE;
}
if (bloodtype >= 1)
{