From 89cdd17cc24581b674208c29838c22db16a3c950 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Sep 2022 12:07:19 +0200 Subject: [PATCH] - floatified PukeSeqCallback --- source/games/blood/src/aizombf.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/games/blood/src/aizombf.cpp b/source/games/blood/src/aizombf.cpp index 45cdcdc8e..137f8fad0 100644 --- a/source/games/blood/src/aizombf.cpp +++ b/source/games/blood/src/aizombf.cpp @@ -64,15 +64,15 @@ void PukeSeqCallback(int, DBloodActor* actor) auto target = actor->GetTarget(); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type); - int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat); - int height2 = (pDudeInfoT->eyeHeight * target->spr.yrepeat); - int tx = actor->xspr.int_TargetPos().X - actor->int_pos().X; - int ty = actor->xspr.int_TargetPos().Y - actor->int_pos().Y; - int nAngle = getangle(tx, ty); - int dx = bcos(nAngle); - int dy = bsin(nAngle); + + DVector2 dv = (actor->xspr.TargetPos.XY() - actor->spr.pos.XY()).Resized(64); + + double height = (actor->spr.yrepeat * pDudeInfo->eyeHeight) * REPEAT_SCALE; + double height2 = (target->spr.yrepeat * pDudeInfoT->eyeHeight) * REPEAT_SCALE; + double z = (height - height2) * 0.25; + sfxPlay3DSound(actor, 1203, 1, 0); - actFireMissile(actor, 0, -(height - height2), dx, dy, 0, kMissilePukeGreen); + actFireMissile(actor, 0, -z, DVector3(dv, 0), kMissilePukeGreen); } void ThrowSeqCallback(int, DBloodActor* actor)