mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-21 11:01:01 +00:00
- Blood: floatified debrisBubble
This commit is contained in:
parent
39d100c970
commit
92f958ded0
1 changed files with 7 additions and 7 deletions
|
@ -1606,16 +1606,16 @@ void debrisConcuss(DBloodActor* owneractor, int listIndex, const DVector3& pos,
|
||||||
|
|
||||||
void debrisBubble(DBloodActor* actor)
|
void debrisBubble(DBloodActor* actor)
|
||||||
{
|
{
|
||||||
int top, bottom;
|
double top, bottom;
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
for (unsigned int i = 0; i < 1 + Random(5); i++) {
|
for (unsigned int i = 0; i < 1 + Random(5); i++) {
|
||||||
|
|
||||||
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) >> 1)) >> 2;
|
double nDist = actor->spr.xrepeat * tileWidth(actor->spr.picnum) * (REPEAT_SCALE * 0.5); // original code ended with * 8 which is 1/2 map unit.
|
||||||
int nAngle = Random(2048);
|
DAngle nAngle = RandomAngle();
|
||||||
int x = actor->int_pos().X + MulScale(nDist, Cos(nAngle), 30);
|
DVector3 pos;
|
||||||
int y = actor->int_pos().Y + MulScale(nDist, Sin(nAngle), 30);
|
pos.XY() = actor->spr.pos.XY() + nAngle.ToVector() * nDist;
|
||||||
int z = bottom - Random(bottom - top);
|
pos.Z = bottom - RandomD(bottom - top, 8);
|
||||||
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), x, y, z, 0);
|
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), pos, nullAngle);
|
||||||
if (pFX) {
|
if (pFX) {
|
||||||
pFX->vel.X = actor->vel.X + Random2F(0x1aaaa);
|
pFX->vel.X = actor->vel.X + Random2F(0x1aaaa);
|
||||||
pFX->vel.Y = actor->vel.Y + Random2F(0x1aaaa);
|
pFX->vel.Y = actor->vel.Y + Random2F(0x1aaaa);
|
||||||
|
|
Loading…
Reference in a new issue