- handle a few nAccel values that do not match the generic pattern

This commit is contained in:
Christoph Oelckers 2022-10-24 11:19:47 +02:00
parent 9927d5e25d
commit dcfac1c930
2 changed files with 6 additions and 6 deletions

View file

@ -310,7 +310,7 @@ static void eelMoveForward(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
return;
if (actor->GetTarget() == nullptr)
@ -335,7 +335,7 @@ static void eelMoveSwoop(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
return;
auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY();
@ -356,7 +356,7 @@ static void eelMoveAscend(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
return;
auto dvec = actor->xspr.TargetPos.XY() - actor->spr.pos.XY();

View file

@ -268,7 +268,7 @@ static void sub_6CB00(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
return;
if (actor->GetTarget() == nullptr)
@ -297,7 +297,7 @@ static void sub_6CD74(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
{
actor->xspr.goalAng += DAngle90;
@ -326,7 +326,7 @@ static void sub_6D03C(DBloodActor* actor)
auto nAng = deltaangle(actor->spr.angle, actor->xspr.goalAng);
auto nTurnRange = pDudeInfo->TurnRange();
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
double nAccel = FixedToFloat((pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2);
if (abs(nAng) > DAngle60)
{
actor->spr.angle += DAngle90;