From 33a3a36da14c72a903e2011565cbc14d6a7e6361 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Aug 2022 22:28:48 +0200 Subject: [PATCH] - floatify pos in movesprite_ex_r --- source/games/duke/src/actors_r.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index f96e83276..7925445e0 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -377,17 +377,17 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un auto dasectp = actor->sector(); - vec3_t pos = actor->int_pos(); - pos.Z -= ((tileHeight(actor->spr.picnum) * actor->spr.yrepeat) << 1); + auto ppos = actor->spr.pos; + ppos.Z -= (tileHeight(actor->spr.picnum) * actor->spr.yrepeat) * REPEAT_SCALE * 0.5; if (bg) { if (actor->spr.xrepeat > 60) - clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 1024, (4 << 8), (4 << 8), cliptype, result); + clipmove(ppos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 1024, (4 << 8), (4 << 8), cliptype, result); else { clipdist = 192; - clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), clipdist, (4 << 8), (4 << 8), cliptype, result); + clipmove(ppos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), clipdist, (4 << 8), (4 << 8), cliptype, result); } if (dasectp == nullptr || (dasectp != nullptr && actor->actorstayput != nullptr && actor->actorstayput != dasectp)) @@ -405,11 +405,11 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un else { if (actor->spr.statnum == STAT_PROJECTILE) - clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8, (4 << 8), (4 << 8), cliptype, result); + clipmove(ppos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 8, (4 << 8), (4 << 8), cliptype, result); else - clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 128, (4 << 8), (4 << 8), cliptype, result); + clipmove(ppos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 128, (4 << 8), (4 << 8), cliptype, result); } - actor->set_int_xy(pos.X, pos.Y); + actor->spr.pos.XY() = ppos.XY(); if (dasectp) if ((dasectp != actor->sector()))