Skip to content

Commit

Permalink
Duke3d: make actors set to move vertically in CON act as if SFLAG_SMO…
Browse files Browse the repository at this point in the history
…OTHMOVE was explicitly enabled

This smooths out stuff like octabrains and flying liztroops without making them look stupid when they move on the ground.
  • Loading branch information
TerminX authored and mjr4077au committed Jun 5, 2022
1 parent dcf1c54 commit 1389413
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
19 changes: 11 additions & 8 deletions source/games/duke/src/actors_d.cpp
Expand Up @@ -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;
}
}
}
}
Expand Down
19 changes: 11 additions & 8 deletions source/games/duke/src/actors_r.cpp
Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 1389413

Please sign in to comment.