diff --git a/source/core/gameinput.h b/source/core/gameinput.h index 86b9d1dfd..e3b65524b 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -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) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index e6bb8f7fc..2b1d7f559 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -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 {