mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +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)
|
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
|
- Fixed: EV_DoDonut, EV_DoElevator and EV_StartWaggle did not to any 0-tag
|
||||||
checks.
|
checks.
|
||||||
- Fixed: Doom line type 44 (lower ceiling to 8 above floor) must halt
|
- 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;
|
AActor *th;
|
||||||
PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
||||||
const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType, NAME_Blood));
|
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;
|
z += pr_spawnblood.Random2 () << 10;
|
||||||
th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE);
|
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);
|
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);
|
PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
||||||
const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType2, NAME_BloodSplatter));
|
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;
|
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);
|
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);
|
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);
|
PalEntry bloodcolor = (PalEntry)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
||||||
const PClass *bloodcls = PClass::FindClass((ENamedName)originator->GetClass()->Meta.GetMetaInt(AMETA_BloodType3, NAME_AxeBlood));
|
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;
|
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);
|
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);
|
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);
|
x = mo->x + (pr_ripperblood.Random2 () << 12);
|
||||||
y = mo->y + (pr_ripperblood.Random2 () << 12);
|
y = mo->y + (pr_ripperblood.Random2 () << 12);
|
||||||
z = mo->z + (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;
|
AActor *th;
|
||||||
th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE);
|
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);
|
th->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cl_bloodtype >= 1)
|
if (bloodtype >= 1)
|
||||||
{
|
{
|
||||||
P_DrawSplash2 (28, x, y, z, 0, 0, bloodcolor);
|
P_DrawSplash2 (28, x, y, z, 0, 0, bloodcolor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ ACTOR Blood
|
||||||
Mass 5
|
Mass 5
|
||||||
+NOBLOCKMAP
|
+NOBLOCKMAP
|
||||||
+NOTELEPORT
|
+NOTELEPORT
|
||||||
|
+ALLOWPARTICLES
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
Spawn:
|
Spawn:
|
||||||
|
@ -30,6 +31,7 @@ ACTOR BloodSplatter
|
||||||
+DROPOFF
|
+DROPOFF
|
||||||
+NOTELEPORT
|
+NOTELEPORT
|
||||||
+CANNOTPUSH
|
+CANNOTPUSH
|
||||||
|
+ALLOWPARTICLES
|
||||||
Mass 5
|
Mass 5
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -53,6 +55,7 @@ ACTOR AxeBlood
|
||||||
+DROPOFF
|
+DROPOFF
|
||||||
+NOTELEPORT
|
+NOTELEPORT
|
||||||
+CANNOTPUSH
|
+CANNOTPUSH
|
||||||
|
+ALLOWPARTICLES
|
||||||
Mass 5
|
Mass 5
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue