This commit is contained in:
Christoph Oelckers 2013-12-01 16:49:55 +01:00
commit 8451cc6e9f
4 changed files with 23 additions and 18 deletions

View file

@ -26,8 +26,6 @@ void A_FAxeAttack (AActor *actor);
extern void AdjustPlayerAngle (AActor *pmo, AActor *linetarget); extern void AdjustPlayerAngle (AActor *pmo, AActor *linetarget);
EXTERN_CVAR (Int, cl_bloodtype)
// The Fighter's Axe -------------------------------------------------------- // The Fighter's Axe --------------------------------------------------------
class AFWeapAxe : public AFighterWeapon class AFWeapAxe : public AFighterWeapon

View file

@ -4879,7 +4879,8 @@ void P_DoCrunch (AActor *thing, FChangePosition *cpos)
const PClass *bloodcls = thing->GetBloodType(); const PClass *bloodcls = thing->GetBloodType();
P_TraceBleed (newdam > 0 ? newdam : cpos->crushchange, thing); P_TraceBleed (newdam > 0 ? newdam : cpos->crushchange, thing);
if (cl_bloodtype <= 1 && bloodcls != NULL)
if (bloodcls != NULL)
{ {
AActor *mo; AActor *mo;
@ -4892,14 +4893,15 @@ void P_DoCrunch (AActor *thing, FChangePosition *cpos)
{ {
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
} }
if (!(cl_bloodtype <= 1)) mo->renderflags |= RF_INVISIBLE;
} }
angle_t an;
an = (M_Random () - 128) << 24;
if (cl_bloodtype >= 1) if (cl_bloodtype >= 1)
{ {
angle_t an; P_DrawSplash2(32, thing->x, thing->y, thing->z + thing->height / 2, an, 2, bloodcolor);
an = (M_Random () - 128) << 24;
P_DrawSplash2 (32, thing->x, thing->y,
thing->z + thing->height/2, an, 2, bloodcolor);
} }
} }
if (thing->CrushPainSound != 0 && !S_GetSoundPlayingInfo(thing, thing->CrushPainSound)) if (thing->CrushPainSound != 0 && !S_GetSoundPlayingInfo(thing, thing->CrushPainSound))

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)) if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0; bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1) if (bloodcls != NULL)
{ {
z += pr_spawnblood.Random2 () << 10; z += pr_spawnblood.Random2 () << 10;
th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement 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: statedone:
if (!(bloodtype <= 1)) th->renderflags |= RF_INVISIBLE;
if (bloodtype >= 1) if (bloodtype >= 1)
P_DrawSplash2 (40, x, y, z, dir, 2, bloodcolor); 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)) if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0; bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1) if (bloodcls != NULL)
{ {
AActor *mo; 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); mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
} }
if (!(bloodtype <= 1)) mo->renderflags |= RF_INVISIBLE;
} }
if (bloodtype >= 1) 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)) if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0; bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1) if (bloodcls != NULL)
{ {
AActor *mo; 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); mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
} }
if (!(bloodtype <= 1)) mo->renderflags |= RF_INVISIBLE;
} }
if (bloodtype >= 1) if (bloodtype >= 1)
{ {
@ -5047,7 +5051,7 @@ void P_RipperBlood (AActor *mo, AActor *bleeder)
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
bloodtype = 0; bloodtype = 0;
if (bloodcls!=NULL && bloodtype <= 1) if (bloodcls != NULL)
{ {
AActor *th; AActor *th;
th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement 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); th->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
} }
if (!(bloodtype <= 1)) th->renderflags |= RF_INVISIBLE;
} }
if (bloodtype >= 1) if (bloodtype >= 1)
{ {

View file

@ -778,11 +778,10 @@ void FTextureManager::ParseAnimatedDoor(FScanner &sc)
} }
} }
frames.Push(v); frames.Push(v);
if (!sc.CheckString("allowdecals")) }
{ else if (!sc.Compare("allowdecals"))
Texture(v)->bNoDecals = true; {
} if (anim.BaseTexture.Exists()) Texture(anim.BaseTexture)->bNoDecals = true;
} }
else else
{ {