Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/Instrument.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System; // Action<>
using System; // Action<>
using System.Collections.Generic;
using System.Diagnostics; // debug todo remove
using System.IO; // Open files
Expand Down Expand Up @@ -111,7 +111,8 @@ public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, Bl

if (GetPlayMode(slot) != PlayMode.abc)
{
Vec3d pos = new Vec3d(byEntity.Pos.X, byEntity.Pos.Y, byEntity.Pos.Z);
var epos = byEntity.GetPos();
Vec3d pos = new Vec3d(epos.X, epos.Y, epos.Z);
NoteStart newNote = new NoteStart();
newNote.pitch = currentNote.pitch;
newNote.positon = pos;
Expand Down Expand Up @@ -148,7 +149,8 @@ public override bool OnHeldInteractStep(float secondsUsed, ItemSlot slot, Entity
// Additionally, update the sound packet
if (GetPlayMode(slot) != PlayMode.abc)
{
Vec3d pos = new Vec3d(byEntity.Pos.X, byEntity.Pos.Y, byEntity.Pos.Z);
var epos = byEntity.GetPos();
Vec3d pos = new Vec3d(epos.X, epos.Y, epos.Z);
NoteUpdate newNote = new NoteUpdate();
newNote.pitch = currentNote.pitch;
newNote.positon = pos;
Expand Down Expand Up @@ -228,13 +230,13 @@ private void Update(ItemSlot slot, EntityAgent byEntity)
switch (GetPlayMode(slot))
{
case PlayMode.lockedTone:
AngleToPitchLockedTone(byEntity.Pos.Pitch);
AngleToPitchLockedTone(byEntity.GetPos().Pitch);
break;
case PlayMode.lockedSemiTone:
AngleToPitchLockedSemiTone(byEntity.Pos.Pitch);
AngleToPitchLockedSemiTone(byEntity.GetPos().Pitch);
break;
case PlayMode.fluid:
AngleToPitch(byEntity.Pos.Pitch);
AngleToPitch(byEntity.GetPos().Pitch);
break;
case PlayMode.abc:
// No logic for this mode; all handled by the server.
Expand Down
4 changes: 2 additions & 2 deletions vsinstruments_base.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\$(Configuration)\Mods\mod</OutputPath>
</PropertyGroup>
Expand Down