From a63527c892853eea09d539cbd289688ff2fcb2a6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Sep 2022 13:45:46 +0200 Subject: [PATCH] - floatified fxDynPuff --- source/games/blood/src/callback.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/games/blood/src/callback.cpp b/source/games/blood/src/callback.cpp index d3f5cfeef..91c9d1452 100644 --- a/source/games/blood/src/callback.cpp +++ b/source/games/blood/src/callback.cpp @@ -221,13 +221,11 @@ void fxArcSpark(DBloodActor* actor, sectortype*) // 7 void fxDynPuff(DBloodActor* actor, sectortype*) // 8 { if (!actor) return; - if (actor->int_vel().Z) + if (actor->vel.Z) { - int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) / 2)) >> 2; - int x = actor->int_pos().X + MulScale(nDist, Cos(actor->int_ang() - 512), 30); - int y = actor->int_pos().Y + MulScale(nDist, Sin(actor->int_ang() - 512), 30); - int z = actor->int_pos().Z; - auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), x, y, z, 0); + double nDist = (actor->spr.xrepeat * tileWidth(actor->spr.picnum)) * (REPEAT_SCALE / 2); + DVector3 pos = actor->spr.pos + (actor->spr.angle - DAngle90).ToVector() * nDist; + auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), pos, 0); if (pFX) { pFX->vel = actor->vel;