mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 16:07:55 +00:00
- fixed: the random offset that gets used when spawning blood applies to both sprites and particles, not just sprites.
This commit is contained in:
parent
1d286d5bd5
commit
32bbec7cad
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
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;
|
||||||
|
|
||||||
if (bloodcls != NULL && !(GetDefaultByType(bloodcls)->flags4 & MF4_ALLOWPARTICLES))
|
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)
|
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
|
||||||
|
|
Loading…
Reference in a new issue