diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 06c4b04dbe..10d1c0a058 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ November 24, 2009 (Changes by Graf Zahl) +- Added MF4_ALLOWPARTICLES checks to blood spawning code. - Fixed: EV_DoDonut, EV_DoElevator and EV_StartWaggle did not to any 0-tag checks. - Fixed: Doom line type 44 (lower ceiling to 8 above floor) must halt diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 15045a15e3..5705fb77b0 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4442,8 +4442,13 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc AActor *th; PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor); const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType, NAME_Blood)); + + int bloodtype = cl_bloodtype; + + if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) + bloodtype = 0; - if (bloodcls!=NULL && cl_bloodtype <= 1) + if (bloodcls!=NULL && bloodtype <= 1) { z += pr_spawnblood.Random2 () << 10; th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE); @@ -4485,7 +4490,7 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc } } - if (cl_bloodtype >= 1) + if (bloodtype >= 1) P_DrawSplash2 (40, x, y, z, dir, 2, bloodcolor); } @@ -4500,7 +4505,12 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator) PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor); const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType2, NAME_BloodSplatter)); - if (bloodcls!=NULL && cl_bloodtype <= 1) + int bloodtype = cl_bloodtype; + + if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) + bloodtype = 0; + + if (bloodcls!=NULL && bloodtype <= 1) { AActor *mo; @@ -4516,7 +4526,7 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator) mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } } - if (cl_bloodtype >= 1) + if (bloodtype >= 1) { P_DrawSplash2 (40, x, y, z, R_PointToAngle2 (x, y, originator->x, originator->y), 2, bloodcolor); } @@ -4533,7 +4543,12 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator) PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor); const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType3, NAME_AxeBlood)); - if (bloodcls!=NULL && cl_bloodtype <= 1) + int bloodtype = cl_bloodtype; + + if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) + bloodtype = 0; + + if (bloodcls!=NULL && bloodtype <= 1) { AActor *mo; @@ -4549,7 +4564,7 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator) mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } } - if (cl_bloodtype >= 1) + if (bloodtype >= 1) { P_DrawSplash2 (100, x, y, z, R_PointToAngle2 (0, 0, originator->x - x, originator->y - y), 2, bloodcolor); } @@ -4570,7 +4585,13 @@ void P_RipperBlood (AActor *mo, AActor *bleeder) x = mo->x + (pr_ripperblood.Random2 () << 12); y = mo->y + (pr_ripperblood.Random2 () << 12); z = mo->z + (pr_ripperblood.Random2 () << 12); - if (bloodcls!=NULL && cl_bloodtype <= 1) + + int bloodtype = cl_bloodtype; + + if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) + bloodtype = 0; + + if (bloodcls!=NULL && bloodtype <= 1) { AActor *th; th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE); @@ -4586,7 +4607,7 @@ void P_RipperBlood (AActor *mo, AActor *bleeder) th->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } } - if (cl_bloodtype >= 1) + if (bloodtype >= 1) { P_DrawSplash2 (28, x, y, z, 0, 0, bloodcolor); } diff --git a/wadsrc/static/actors/shared/blood.txt b/wadsrc/static/actors/shared/blood.txt index 5a7ae201d2..1a294c6afd 100644 --- a/wadsrc/static/actors/shared/blood.txt +++ b/wadsrc/static/actors/shared/blood.txt @@ -7,6 +7,7 @@ ACTOR Blood Mass 5 +NOBLOCKMAP +NOTELEPORT + +ALLOWPARTICLES States { Spawn: @@ -30,6 +31,7 @@ ACTOR BloodSplatter +DROPOFF +NOTELEPORT +CANNOTPUSH + +ALLOWPARTICLES Mass 5 States { @@ -53,6 +55,7 @@ ACTOR AxeBlood +DROPOFF +NOTELEPORT +CANNOTPUSH + +ALLOWPARTICLES Mass 5 States {