From ac84e3f045d1ff3b47aa53fe9fe0dada94bb79db Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Sep 2022 10:11:05 +0200 Subject: [PATCH] - some simple replacements --- source/games/blood/src/actor.cpp | 2 +- source/games/blood/src/callback.cpp | 4 +--- source/games/blood/src/nnexts.cpp | 11 ++++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 22cf04f57..d1cff02bf 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4624,7 +4624,7 @@ static Collision MoveThing(DBloodActor* actor) actor->set_int_bvel_z(FloatToFixed(vec4.Z)); if (actor->sector()->velFloor == 0 && abs(actor->int_vel().Z) < 0x10000) { - actor->set_int_bvel_z(0); + actor->vel.Z = 0; actor->spr.flags &= ~4; } diff --git a/source/games/blood/src/callback.cpp b/source/games/blood/src/callback.cpp index 5690157f3..a088b2c8d 100644 --- a/source/games/blood/src/callback.cpp +++ b/source/games/blood/src/callback.cpp @@ -243,9 +243,7 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8 auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), x, y, z, 0); if (pFX) { - pFX->set_int_bvel_x(actor->int_vel().X); - pFX->set_int_bvel_y(actor->int_vel().Y); - pFX->set_int_bvel_z(actor->int_vel().Z); + pFX->vel = actor->vel; } } evPostActor(actor, 12, kCallbackFXDynPuff); diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index fd249887b..cac106fc8 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -3140,9 +3140,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi auto velv = pSprite->vel.XY(); auto pt = rotatepoint(pSprite->spr.pos.XY(), velv, angl); - //actor->vel.XY() = pt; - pSprite->set_int_bvel_x(pt.X * worldtoint); - pSprite->set_int_bvel_y(pt.Y * worldtoint); + pSprite->vel.XY() = pt; vAng = getVelocityAngle(pSprite); @@ -3294,13 +3292,12 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor) { auto velv = actor->vel.XY(); auto pt = rotatepoint(actor->spr.pos.XY(), velv, sourceactor->spr.angle - VecToAngle(velv)); - //actor->vel.XY() = pt; - actor->set_int_bvel_x(pt.X * worldtoint); - actor->set_int_bvel_y(pt.Y * worldtoint); + actor->vel.XY() = pt; + } if (sourceactor->xspr.data3 & kModernTypeFlag4) - actor->set_int_bvel_z(0); + actor->vel.Z = 0; } if (sourceactor->xspr.data2 == 1)