- Duke: Fix crane's angle settarget() call.

* Fixes #185.
This commit is contained in:
Mitchell Richters 2020-11-22 23:57:35 +11:00 committed by Christoph Oelckers
parent c42771228d
commit e57d6f8785
2 changed files with 16 additions and 1 deletions

View file

@ -195,6 +195,20 @@ struct PlayerAngle
}
}
void settarget(binangle value, bool backup = false)
{
if (!cl_syncinput)
{
target = value.asbam();
if (target == 0) target += 1;
}
else
{
ang = value;
if (backup) oang = ang;
}
}
void processhelpers(double const scaleAdjust)
{
if (target)

View file

@ -730,7 +730,8 @@ void movecrane(DDukeActor *actor, int crane)
actor->SetActiveCrane(true);
ps[p].on_crane = actor;
S_PlayActorSound(isRR() ? 390 : DUKE_GRUNT, ps[p].GetActor());
ps[p].angle.settarget(spri->ang + 1024);
auto ang = ps[p].angle.ang;
ps[p].angle.settarget(ang + getincanglebam(ang, buildang(spri->ang + 1024)));
}
else
{