From 32bbec7cadbea9d5ca318030a29eaacaa921795d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 7 Apr 2016 14:14:44 +0200 Subject: [PATCH] - fixed: the random offset that gets used when spawning blood applies to both sprites and particles, not just sprites. --- src/p_mobj.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 2c7c4ea42..13670bcb1 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5129,12 +5129,14 @@ AActor *P_SpawnPuff (AActor *source, PClassActor *pufftype, const DVector3 &pos, // //--------------------------------------------------------------------------- -void P_SpawnBlood (const DVector3 &pos, DAngle dir, int damage, AActor *originator) +void P_SpawnBlood (const DVector3 &pos1, DAngle dir, int damage, AActor *originator) { AActor *th; PalEntry bloodcolor = originator->GetBloodColor(); PClassActor *bloodcls = originator->GetBloodType(); - + DVector3 pos = pos1; + pos.Z += pr_spawnblood.Random2() / 64.; + int bloodtype = cl_bloodtype; if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES)) @@ -5142,8 +5144,7 @@ void P_SpawnBlood (const DVector3 &pos, DAngle dir, int damage, AActor *originat if (bloodcls != NULL) { - double z = pr_spawnblood.Random2 () / 64.; - th = Spawn(bloodcls, pos + DVector3(0, 0, z), NO_REPLACE); // GetBloodType already performed the replacement + th = Spawn(bloodcls, pos, NO_REPLACE); // GetBloodType already performed the replacement th->Vel.Z = 2; th->Angles.Yaw = dir; // [NG] Applying PUFFGETSOWNER to the blood will make it target the owner