- Blood: Add DAngle overload for CFX::fxSpawnActor().

This commit is contained in:
Mitchell Richters 2022-09-18 21:20:20 +10:00 committed by Christoph Oelckers
parent e124288b57
commit e5226c65a9
3 changed files with 7 additions and 1 deletions

View file

@ -2946,7 +2946,7 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
else else
{ {
seqKill(actor); seqKill(actor);
DBloodActor* pEffect = gFX.fxSpawnActor((FX_ID)52, actor->sector(), actor->spr.pos, actor->int_ang()); DBloodActor* pEffect = gFX.fxSpawnActor((FX_ID)52, actor->sector(), actor->spr.pos, actor->spr.angle);
if (pEffect != nullptr) if (pEffect != nullptr)
{ {
pEffect->spr.cstat = CSTAT_SPRITE_ALIGNMENT_FACING; pEffect->spr.cstat = CSTAT_SPRITE_ALIGNMENT_FACING;

View file

@ -141,6 +141,11 @@ DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, int x, int y, int
return fxSpawnActor(nFx, pSector, pos, a6); return fxSpawnActor(nFx, pSector, pos, a6);
} }
DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& pos, DAngle a6)
{
return fxSpawnActor(nFx, pSector, pos, a6.Buildang());
}
DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& pos, unsigned int a6) DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& pos, unsigned int a6)
{ {
if (pSector == nullptr) if (pSector == nullptr)

View file

@ -94,6 +94,7 @@ public:
void destroy(DBloodActor*); void destroy(DBloodActor*);
void remove(DBloodActor*); void remove(DBloodActor*);
DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, int c, int d, int e, unsigned int f); DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, int c, int d, int e, unsigned int f);
DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, const DVector3& pos, DAngle f);
DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, const DVector3& pos, unsigned int f); DBloodActor* fxSpawnActor(FX_ID a, sectortype* b, const DVector3& pos, unsigned int f);
void fxProcess(void); void fxProcess(void);
}; };