- fixed: the random offset that gets used when spawning blood applies to both sprites and particles, not just sprites.

This commit is contained in:
Christoph Oelckers 2016-04-07 14:14:44 +02:00
parent 1d286d5bd5
commit 32bbec7cad

View file

@ -5129,11 +5129,13 @@ 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; AActor *th;
PalEntry bloodcolor = originator->GetBloodColor(); PalEntry bloodcolor = originator->GetBloodColor();
PClassActor *bloodcls = originator->GetBloodType(); PClassActor *bloodcls = originator->GetBloodType();
DVector3 pos = pos1;
pos.Z += pr_spawnblood.Random2() / 64.;
int bloodtype = cl_bloodtype; int bloodtype = cl_bloodtype;
@ -5142,8 +5144,7 @@ void P_SpawnBlood (const DVector3 &pos, DAngle dir, int damage, AActor *originat
if (bloodcls != NULL) if (bloodcls != NULL)
{ {
double z = pr_spawnblood.Random2 () / 64.; th = Spawn(bloodcls, pos, NO_REPLACE); // GetBloodType already performed the replacement
th = Spawn(bloodcls, pos + DVector3(0, 0, z), NO_REPLACE); // GetBloodType already performed the replacement
th->Vel.Z = 2; th->Vel.Z = 2;
th->Angles.Yaw = dir; th->Angles.Yaw = dir;
// [NG] Applying PUFFGETSOWNER to the blood will make it target the owner // [NG] Applying PUFFGETSOWNER to the blood will make it target the owner