From 8b2ddfadf6999f6cb9f40e26f4c87aa29fa5d725 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Sep 2022 19:13:38 +0200 Subject: [PATCH] - restore code as it was, buggy as it may be. --- source/games/blood/src/aicerber.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/source/games/blood/src/aicerber.cpp b/source/games/blood/src/aicerber.cpp index 113152926..2f39d8c67 100644 --- a/source/games/blood/src/aicerber.cpp +++ b/source/games/blood/src/aicerber.cpp @@ -81,11 +81,10 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor) double height = pDudeInfo->eyeHeight * actor->spr.yrepeat * REPEAT_SCALE * 0.25; if (!actor->ValidateTarget(__FUNCTION__)) return; - auto pos = actor->spr.pos.plusZ(height); + DVector3 pos(actor->spr.pos.XY(), height); + //auto pos = actor->spr.pos.plusZ(height); // what it probably should be - DVector3 Aim; - Aim.XY() = actor->spr.angle.ToVector(); - Aim.Z = actor->dudeSlope / 16384.; + DVector3 Aim(actor->spr.angle.ToVector(), actor->dudeSlope / 16384.); double nClosest = 0x7fffffff; BloodStatIterator it(kStatDude); while (auto actor2 = it.Next()) @@ -143,12 +142,12 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor) DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); double height = pDudeInfo->eyeHeight * actor->spr.yrepeat * REPEAT_SCALE * 0.25; - auto pos = actor->spr.pos.plusZ(height); + DVector3 pos(actor->spr.pos.XY(), height); + //auto pos = actor->spr.pos.plusZ(height); // what it probably should be + + DVector3 Aim(actor->spr.angle.ToVector(), actor->dudeSlope / 16384.); + DVector3 Aim2(Aim.XY(), 0); - DVector3 Aim, Aim2; - Aim2.XY() = Aim.XY() = actor->spr.angle.ToVector(); - Aim.Z = actor->dudeSlope / 16384.; - Aim2.Z = 0; double nClosest = 0x7fffffff; BloodStatIterator it(kStatDude);