mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- floatified EnemyBubble
This commit is contained in:
parent
caf6dacbb5
commit
60e9e4d93a
1 changed files with 7 additions and 7 deletions
|
@ -366,16 +366,16 @@ void PlayerBubble(DBloodActor* actor, sectortype*) // 10
|
|||
void EnemyBubble(DBloodActor* actor, sectortype*) // 11
|
||||
{
|
||||
if (!actor) return;
|
||||
int top, bottom;
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
for (int i = 0; i < (abs(actor->int_vel().Z) >> 18); i++)
|
||||
{
|
||||
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) / 2)) >> 2;
|
||||
int nAngle = Random(2048);
|
||||
int x = actor->int_pos().X + MulScale(nDist, Cos(nAngle), 30);
|
||||
int y = actor->int_pos().Y + MulScale(nDist, Sin(nAngle), 30);
|
||||
int z = bottom - Random(bottom - top);
|
||||
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
|
||||
auto nAngle = RandomAngle();
|
||||
double nDist = (actor->spr.xrepeat * tileWidth(actor->spr.picnum)) * (REPEAT_SCALE / 2);
|
||||
DVector2 pos = actor->spr.pos.XY() + nAngle.ToVector() * nDist;
|
||||
double z = bottom - RandomD(bottom - top, 8);
|
||||
|
||||
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), DVector3(pos, z), 0);
|
||||
if (pFX)
|
||||
{
|
||||
pFX->vel.X = actor->vel.X + Random2F(0x1aaaa);
|
||||
|
|
Loading…
Reference in a new issue