- handle all remaining set_int_xvel and set_int_zvel.

This commit is contained in:
Christoph Oelckers 2022-09-14 19:49:38 +02:00
parent e73a6409bb
commit 13dd7260f5
6 changed files with 10 additions and 9 deletions

View file

@ -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++;

View file

@ -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++;

View file

@ -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()));

View file

@ -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()));

View file

@ -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)

View file

@ -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;