Skip to content

Commit

Permalink
Rotate after move finished
Browse files Browse the repository at this point in the history
  • Loading branch information
GiR_Zippo committed Jul 13, 2024
1 parent 270f58f commit fcc6a8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions HypnotoadPlugin/GameFunctions/MovementFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public void Move()
move.Precision = 0.05f;
move.DesiredPosition = DesiredPosition;

cam.DesiredAzimuth = DesiredRotation;
cam.Enabled = true;
//cam.DesiredAzimuth = DesiredRotation;
//cam.Enabled = true;

cancelMovementToken = new CancellationTokenSource();
Task.Factory.StartNew(() => RunMoveTask(cancelMovementToken.Token), TaskCreationOptions.LongRunning);
Expand Down Expand Up @@ -118,6 +118,8 @@ private async Task RunMoveTask(CancellationToken token)
var dist = move.DesiredPosition - Api.ClientState.LocalPlayer.Position;
if (dist.LengthSquared() <= move.Precision * move.Precision)
{
cam.DesiredAzimuth = DesiredRotation;
cam.Enabled = true;
move.Enabled = false;
await Task.Delay(300, token).ContinueWith(static tsk => { }, token);
cam.Enabled = false;
Expand Down
2 changes: 1 addition & 1 deletion HypnotoadPlugin/HypnotoadPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<Description>BardMusicPlayer &amp; LightAmp companion for enhanced functionality.</Description>
<PackageProjectUrl>https://github.com/GiR-Zippo/Hypnotoad-Plugin</PackageProjectUrl>
<Version>0.0.1.29</Version>
<Version>0.0.1.30</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit fcc6a8f

Please sign in to comment.