mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- only have one version of fxSpawnActor
This commit is contained in:
parent
10144b0436
commit
65a5394cf0
3 changed files with 8 additions and 19 deletions
|
@ -2709,7 +2709,7 @@ static void actNapalmMove(DBloodActor* actor)
|
|||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
double t1 = RandomD(3.2) + 3.2;
|
||||
auto rndang = DAngle::fromBuild(Random2(0x71));
|
||||
auto rndang = Random2A(0x71);
|
||||
actor->spr.angle = (ang + rndang).Normalized360();
|
||||
auto spawned = actFireThing(actor, 0., 0., -0.5774, kThingNapalmBall, t1);
|
||||
spawned->SetOwner(actor->GetOwner());
|
||||
|
@ -4560,7 +4560,7 @@ static Collision MoveThing(DBloodActor* actor)
|
|||
actor->vel.Z += FixedToFloat(58254);
|
||||
if (actor->spr.type == kThingZombieHead)
|
||||
{
|
||||
auto* fxActor = gFX.fxSpawnActor(FX_27, actor->sector(), actor->spr.pos, 0);
|
||||
auto* fxActor = gFX.fxSpawnActor(FX_27, actor->sector(), actor->spr.pos, nullAngle);
|
||||
if (fxActor)
|
||||
{
|
||||
auto vect1 = DVector2(64./15., 0.).Rotated(DAngle::fromBuild((PlayClock * 11) & 2047));
|
||||
|
|
|
@ -94,11 +94,5 @@ void aiProcessDudes(void);
|
|||
void aiInit(void);
|
||||
void aiInitSprite(DBloodActor* pSprite);
|
||||
bool CanMove(DBloodActor* pSprite, DBloodActor* target, DAngle nAngle, double nRange);
|
||||
/*
|
||||
inline bool CanMove(DBloodActor* pSprite, DBloodActor* target, DAngle nAngle, double nRange)
|
||||
{
|
||||
return CanMove(pSprite, target, nAngle.Buildang(), nRange);
|
||||
}
|
||||
*/
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -38,7 +38,7 @@ struct FXDATA {
|
|||
int16_t flags; // flags
|
||||
int32_t gravity; // gravity
|
||||
int32_t drag; // air drag
|
||||
int32_t ate;
|
||||
int32_t defangle;
|
||||
int16_t picnum; // picnum
|
||||
uint8_t xrepeat; // xrepeat
|
||||
uint8_t yrepeat; // yrepeat
|
||||
|
@ -135,12 +135,7 @@ void CFX::remove(DBloodActor* actor)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
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, DAngle angle)
|
||||
{
|
||||
if (pSector == nullptr)
|
||||
return nullptr;
|
||||
|
@ -189,10 +184,10 @@ DBloodActor* CFX::fxSpawnActor(FX_ID nFx, sectortype* pSector, const DVector3& p
|
|||
actor->addX();
|
||||
seqSpawn(pFX->seq, actor, -1);
|
||||
}
|
||||
if (a6 == 0)
|
||||
a6 = pFX->ate;
|
||||
if (a6)
|
||||
evPostActor(actor, a6 + Random2(a6 >> 1), kCallbackRemove);
|
||||
if (angle == nullAngle)
|
||||
angle = mapangle(pFX->defangle);
|
||||
if (angle != nullAngle)
|
||||
evPostActor(actor, angle.Buildang() + Random2(angle.Buildang() >> 1), kCallbackRemove);
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue