- more add_int_bvel_

This commit is contained in:
Christoph Oelckers 2022-09-01 21:10:35 +02:00
parent 1999340c8a
commit b78d5a95ac
3 changed files with 11 additions and 11 deletions

View file

@ -4503,7 +4503,7 @@ void actAirDrag(DBloodActor* actor, int a2)
}
actor->add_int_bvel_x(MulScale(wind_x - actor->int_vel().X, a2, 16));
actor->add_int_bvel_y(MulScale(wind_y - actor->int_vel().Y, a2, 16));
actor->__int_vel.Z -= MulScale(actor->int_vel().Z, a2, 16);
actor->add_int_bvel_z(-MulScale(actor->int_vel().Z, a2, 16));
}
//---------------------------------------------------------------------------
@ -4705,8 +4705,8 @@ static Collision MoveThing(DBloodActor* actor)
if (nVel > 0)
{
int t = DivScale(nVelClipped, nVel, 16);
actor->__int_vel.X -= MulScale(t, actor->int_vel().X, 16);
actor->__int_vel.Y -= MulScale(t, actor->int_vel().Y, 16);
actor->add_int_bvel_x(-MulScale(t, actor->int_vel().X, 16));
actor->add_int_bvel_y(-MulScale(t, actor->int_vel().Y, 16));
}
}
if (actor->__int_vel.X || actor->int_vel().Y)
@ -5192,8 +5192,8 @@ void MoveDude(DBloodActor* actor)
int nDrag = gDudeDrag;
if (actor->xspr.height > 0)
nDrag -= Scale(gDudeDrag, actor->xspr.height, 0x100);
actor->__int_vel.X -= mulscale16r(actor->int_vel().X, nDrag);
actor->__int_vel.Y -= mulscale16r(actor->int_vel().Y, nDrag);
actor->add_int_bvel_x(-mulscale16r(actor->int_vel().X, nDrag));
actor->add_int_bvel_y(-mulscale16r(actor->int_vel().Y, nDrag));
if (approxDist(actor->int_vel().X, actor->int_vel().Y) < 0x1000)
actor->clear_vel_xy();

View file

@ -1726,7 +1726,7 @@ void debrisMove(int listIndex)
if (pSector->lowerLink) cz += (cz < 0) ? 0x500 : -0x500;
if (top > cz && (!(actor->xspr.physAttr & kPhysDebrisFloat) || fz <= bottom << 2))
actor->__int_vel.Z -= DivScale((bottom - ceilZ) >> 6, mass, 8);
actor->add_int_bvel_z(-DivScale((bottom - ceilZ) >> 6, mass, 8));
if (fz < bottom)
vc = 58254 + ((bottom - fz) * -80099) / div;
@ -1868,8 +1868,8 @@ void debrisMove(int listIndex)
if (actor->xspr.height > 0)
nDrag -= Scale(nDrag, actor->xspr.height, 0x100);
actor->__int_vel.X -= mulscale16r(actor->int_vel().X, nDrag);
actor->__int_vel.Y -= mulscale16r(actor->int_vel().Y, nDrag);
actor->add_int_bvel_x(-mulscale16r(actor->int_vel().X, nDrag));
actor->add_int_bvel_y(-mulscale16r(actor->int_vel().Y, nDrag));
if (approxDist(actor->int_vel().X, actor->int_vel().Y) < 0x1000)
actor->clear_vel_xy();
}

View file

@ -1608,7 +1608,7 @@ void ProcessInput(PLAYER* pPlayer)
int strafe = pInput->svel;
strafe = MulScale(pPosture->sideAccel, strafe, 8);
actor->add_int_bvel_x(MulScale(strafe, y, 30));
actor->__int_vel.Y -= MulScale(strafe, x, 30);
actor->add_int_bvel_y(-MulScale(strafe, x, 30));
}
}
else if (actor->xspr.height < 256)
@ -1637,7 +1637,7 @@ void ProcessInput(PLAYER* pPlayer)
if (actor->xspr.height)
strafe = MulScale(strafe, speed, 16);
actor->add_int_bvel_x(MulScale(strafe, y, 30));
actor->__int_vel.Y -= MulScale(strafe, x, 30);
actor->add_int_bvel_y(-MulScale(strafe, x, 30));
}
}
@ -1656,7 +1656,7 @@ void ProcessInput(PLAYER* pPlayer)
switch (pPlayer->posture) {
case 1:
if (pInput->actions & SB_JUMP)
actor->__int_vel.Z -= pPosture->normalJumpZ;//0x5b05;
actor->add_int_bvel_z(-pPosture->normalJumpZ);//0x5b05;
if (pInput->actions & SB_CROUCH)
actor->add_int_bvel_z(pPosture->normalJumpZ);//0x5b05;
break;