From 1389413ca12644c521b95eb33ea5bf033be10b19 Mon Sep 17 00:00:00 2001 From: Richard Gobeille Date: Fri, 12 Nov 2021 07:53:56 -0800 Subject: [PATCH] Duke3d: make actors set to move vertically in CON act as if SFLAG_SMOOTHMOVE was explicitly enabled This smooths out stuff like octabrains and flying liztroops without making them look stupid when they move on the ground. --- source/games/duke/src/actors_d.cpp | 19 +++++++++++-------- source/games/duke/src/actors_r.cpp | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 3be4c3e54..bab21064d 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3687,15 +3687,18 @@ void move_d(DDukeActor *actor, int playernum, int xvel) } else if (actor->spr.picnum != DRONE && actor->spr.picnum != SHARK && actor->spr.picnum != COMMANDER) { - if (actor->opos.Z != actor->spr.pos.Z || (ud.multimode < 2 && ud.player_skill < 2)) + if (!*(moveptr + 1)) { - if ((actor->temp_data[0] & 1) || ps[playernum].actorsqu == actor) return; - else daxvel <<= 1; - } - else - { - if ((actor->temp_data[0] & 3) || ps[playernum].actorsqu == actor) return; - else daxvel <<= 2; + if (actor->opos.Z != actor->spr.pos.Z || (ud.multimode < 2 && ud.player_skill < 2)) + { + if ((actor->temp_data[0] & 1) || ps[playernum].actorsqu == actor) return; + else daxvel <<= 1; + } + else + { + if ((actor->temp_data[0] & 3) || ps[playernum].actorsqu == actor) return; + else daxvel <<= 2; + } } } } diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 00db74068..1d2e0e3bb 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -3716,15 +3716,18 @@ void move_r(DDukeActor *actor, int pnum, int xvel) (!isRRRA() && actor->spr.picnum != DRONE && actor->spr.picnum != SHARK && actor->spr.picnum != UFO1_RR && actor->spr.picnum != UFO2 && actor->spr.picnum != UFO3 && actor->spr.picnum != UFO4 && actor->spr.picnum != UFO5)) { - if (actor->opos.Z != actor->spr.pos.Z || (ud.multimode < 2 && ud.player_skill < 2)) + if (!*(moveptr + 1)) { - if ((actor->temp_data[0] & 1) || ps[pnum].actorsqu == actor) return; - else daxvel <<= 1; - } - else - { - if ((actor->temp_data[0] & 3) || ps[pnum].actorsqu == actor) return; - else daxvel <<= 2; + if (actor->opos.Z != actor->spr.pos.Z || (ud.multimode < 2 && ud.player_skill < 2)) + { + if ((actor->temp_data[0] & 1) || ps[pnum].actorsqu == actor) return; + else daxvel <<= 1; + } + else + { + if ((actor->temp_data[0] & 3) || ps[pnum].actorsqu == actor) return; + else daxvel <<= 2; + } } } }