SpawnBlood now returns an actor spawned by the function.
This commit is contained in:
parent
a2236c144e
commit
bf6f175305
3 changed files with 7 additions and 6 deletions
|
|
@ -106,7 +106,7 @@ enum EPuffFlags
|
|||
};
|
||||
|
||||
AActor *P_SpawnPuff(AActor *source, PClassActor *pufftype, const DVector3 &pos, DAngle hitdir, DAngle particledir, int updown, int flags = 0, AActor *vict = NULL);
|
||||
void P_SpawnBlood (const DVector3 &pos, DAngle angle, int damage, AActor *originator);
|
||||
AActor *P_SpawnBlood (const DVector3 &pos, DAngle angle, int damage, AActor *originator);
|
||||
void P_BloodSplatter (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
||||
void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
||||
void P_RipperBlood (AActor *mo, AActor *bleeder);
|
||||
|
|
|
|||
|
|
@ -6382,9 +6382,9 @@ DEFINE_ACTION_FUNCTION(AActor, SpawnPuff)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_SpawnBlood (const DVector3 &pos1, DAngle dir, int damage, AActor *originator)
|
||||
AActor *P_SpawnBlood (const DVector3 &pos1, DAngle dir, int damage, AActor *originator)
|
||||
{
|
||||
AActor *th;
|
||||
AActor *th = nullptr;
|
||||
PClassActor *bloodcls = originator->GetBloodType();
|
||||
DVector3 pos = pos1;
|
||||
pos.Z += pr_spawnblood.Random2() / 64.;
|
||||
|
|
@ -6469,6 +6469,8 @@ void P_SpawnBlood (const DVector3 &pos1, DAngle dir, int damage, AActor *origina
|
|||
|
||||
if (bloodtype >= 1)
|
||||
P_DrawSplash2 (originator->Level, 40, pos, dir, 2, originator->BloodColor);
|
||||
|
||||
return th;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, SpawnBlood)
|
||||
|
|
@ -6479,8 +6481,7 @@ DEFINE_ACTION_FUNCTION(AActor, SpawnBlood)
|
|||
PARAM_FLOAT(z);
|
||||
PARAM_ANGLE(dir);
|
||||
PARAM_INT(damage);
|
||||
P_SpawnBlood(DVector3(x, y, z), dir, damage, self);
|
||||
return 0;
|
||||
ACTION_RETURN_OBJECT(P_SpawnBlood(DVector3(x, y, z), dir, damage, self));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -775,7 +775,7 @@ class Actor : Thinker native
|
|||
|
||||
native Actor OldSpawnMissile(Actor dest, class<Actor> type, Actor owner = null);
|
||||
native Actor SpawnPuff(class<Actor> pufftype, vector3 pos, double hitdir, double particledir, int updown, int flags = 0, Actor victim = null);
|
||||
native void SpawnBlood (Vector3 pos1, double dir, int damage);
|
||||
native Actor SpawnBlood (Vector3 pos1, double dir, int damage);
|
||||
native void BloodSplatter (Vector3 pos, double hitangle, bool axe = false);
|
||||
native bool HitWater (sector sec, Vector3 pos, bool checkabove = false, bool alert = true, bool force = false, int flags = 0);
|
||||
native void PlaySpawnSound(Actor missile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue