diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 29952ca41..4321bc51a 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -2569,7 +2569,7 @@ static void heavyhbomb(DDukeActor *actor) { if (actor->spr.yint > 0 || (actor->spr.yint == 0 && actor->floorz == sectp->floorz)) S_PlayActorSound(PIPEBOMB_BOUNCE, actor); - actor->set_int_zvel(-((4 - actor->spr.yint) << 8)); + actor->vel.Z = -(4 - actor->spr.yint); if (actor->sector()->lotag == 2) actor->vel.Z *= 0.25; actor->spr.yint++; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 8a6d6f8da..3ab331963 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -1203,7 +1203,7 @@ static void weaponcommon_r(DDukeActor *proj) if (!isRRRA()) break; if (proj->spr.extra) { - proj->set_int_zvel(-(proj->spr.extra * 250)); + proj->vel.Z = -(proj->spr.extra * 250/256.); // 250 looks like a typo... proj->spr.extra--; } else @@ -2344,7 +2344,7 @@ static void heavyhbomb(DDukeActor *actor) goto DETONATEB; } } - actor->set_int_zvel(-((4 - actor->spr.yint) << 8)); + actor->vel.Z = -(4 - actor->spr.yint); if (actor->sector()->lotag == 2) actor->vel.Z *= 0.25; actor->spr.yint++; diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index edc612d53..7cbc6426d 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -2897,7 +2897,7 @@ void processinput_d(int snum) p->playerweaponsway(pact->int_xvel()); - pact->set_int_xvel(int(clamp((p->pos.XY() - p->bobpos).Length(), 0., 32.) * worldtoint)); + pact->vel.X = clamp((p->pos.XY() - p->bobpos).Length(), 0., 32.); if (p->on_ground) p->bobcounter += p->GetActor()->int_xvel() >> 1; p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == MIRROR) || !p->insector())); diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 5b13b3fda..55f7d177c 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -3575,7 +3575,7 @@ void processinput_r(int snum) p->playerweaponsway(pact->int_xvel()); - pact->set_int_xvel(int(clamp((p->pos.XY() - p->bobpos).Length(), 0., 32.) * worldtoint)); + pact->vel.X = clamp((p->pos.XY() - p->bobpos).Length(), 0., 32.); if (p->on_ground) p->bobcounter += p->GetActor()->int_xvel() >> 1; p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == MIRROR) || !p->insector())); diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index 2ea6cbe95..6422fe4ed 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -1384,8 +1384,9 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj) if (targ->spr.picnum != TANK && !bossguy(targ) && targ->spr.picnum != RECON && targ->spr.picnum != ROTATEGUN) { if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0) - targ->set_int_ang((proj->int_ang() + 1024) & 2047); - targ->set_int_xvel(-(proj->spr.extra << 2)); + targ->spr.angle = proj->spr.angle + DAngle90; + + targ->vel.X = -proj->spr.extra * 0.25; auto sp = targ->sector(); pushmove(targ, &sp, 128L, (4 << 8), (4 << 8), CLIPMASK0); if (sp != targ->sector() && sp != nullptr) diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 1a357f7e2..c43f3a9e7 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -71,8 +71,8 @@ DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, in act->spr.pal = 0; act->set_int_ang(s_a); - act->set_int_xvel(s_ve); - act->set_int_zvel(s_zv); + act->vel.X = (s_ve) * inttoworld; + act->vel.Z = (s_zv) * zinttoworld; act->spr.xoffset = 0; act->spr.yoffset = 0; act->spr.yint = 0;