mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- Added MF4_ALLOWPARTICLES checks to blood spawning code.
SVN r2001 (trunk)
This commit is contained in:
parent
233e662a92
commit
5d7670acc4
3 changed files with 33 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue