From 5ea7675eca4fe50feed7fc4b871075f8c937d8b1 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:30:12 +0200 Subject: Updated protocol functions to Vector3x also added support in included functions --- src/Protocol/Protocol_1_10.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Protocol/Protocol_1_10.cpp') diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp index 4f3e1a52b..beca6db24 100644 --- a/src/Protocol/Protocol_1_10.cpp +++ b/src/Protocol/Protocol_1_10.cpp @@ -311,16 +311,16 @@ namespace Metadata //////////////////////////////////////////////////////////////////////////////// // cProtocol_1_10_0: -void cProtocol_1_10_0::SendSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) +void cProtocol_1_10_0::SendSoundEffect(const AString & a_SoundName, Vector3d a_Origin, float a_Volume, float a_Pitch) { ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktSoundEffect); Pkt.WriteString(a_SoundName); Pkt.WriteVarInt32(0); // Master sound category (may want to be changed to a parameter later) - Pkt.WriteBEInt32(FloorC(a_X * 8.0)); - Pkt.WriteBEInt32(FloorC(a_Y * 8.0)); - Pkt.WriteBEInt32(FloorC(a_Z * 8.0)); + Pkt.WriteBEInt32(FloorC(a_Origin.x * 8.0)); + Pkt.WriteBEInt32(FloorC(a_Origin.y * 8.0)); + Pkt.WriteBEInt32(FloorC(a_Origin.z * 8.0)); Pkt.WriteBEFloat(a_Volume); Pkt.WriteBEFloat(a_Pitch); } -- cgit v1.2.3