From 3d62cbf58d8bd343f01706257dd82150073de034 Mon Sep 17 00:00:00 2001 From: qornwh1 Date: Thu, 12 Mar 2026 16:49:23 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20Vector3=20int=20->=20float,=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=EC=8B=9C=20int=20=EC=BA=90=EC=8A=A4=ED=8C=85?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0,=20=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8?= =?UTF-8?q?=20=EC=8B=A4=ED=96=89=EC=8B=9C=20setting.json=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ClientTester/EchoClientTester/DummyService/DummyClients.cs | 6 +++--- .../EchoClientTester/StressTest/StressTestClient.cs | 6 +++--- ClientTester/EchoClientTester/Vector3.cs | 6 +++--- ClientTester/EchoClientTester/appsettings.json | 6 ++++++ 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 ClientTester/EchoClientTester/appsettings.json diff --git a/ClientTester/EchoClientTester/DummyService/DummyClients.cs b/ClientTester/EchoClientTester/DummyService/DummyClients.cs index af2b448..6d26af2 100644 --- a/ClientTester/EchoClientTester/DummyService/DummyClients.cs +++ b/ClientTester/EchoClientTester/DummyService/DummyClients.cs @@ -125,8 +125,8 @@ public class DummyClients distance = hitWall ? 0f : distance - step; // 정수 Vector3 갱신 - position.X = (int)MathF.Round(posX); - position.Z = (int)MathF.Round(posZ); + position.X = posX; + position.Z = posZ; } public void SendTransform() @@ -144,7 +144,7 @@ public class DummyClients Position = new Packet.Position { X = position.X, - Y = 0, // 높이는 버린다. + Y = -0.5f, // 높이는 버린다. Z = position.Z } }; diff --git a/ClientTester/EchoClientTester/StressTest/StressTestClient.cs b/ClientTester/EchoClientTester/StressTest/StressTestClient.cs index 854a250..073276f 100644 --- a/ClientTester/EchoClientTester/StressTest/StressTestClient.cs +++ b/ClientTester/EchoClientTester/StressTest/StressTestClient.cs @@ -144,15 +144,15 @@ public class StressTestClient posX = nextX; posZ = nextZ; distance = hitWall ? 0f : distance - step; - position.X = (int)MathF.Round(posX); - position.Z = (int)MathF.Round(posZ); + position.X = posX; + position.Z = posZ; // 전송 TransformPlayerPacket pkt = new TransformPlayerPacket { PlayerId = clientId, RotY = rotY, - Position = new Packet.Position { X = position.X, Y = 0, Z = position.Z } + Position = new Packet.Position { X = position.X, Y = -0.5f, Z = position.Z } }; byte[] data = PacketSerializer.Serialize((ushort)PacketCode.TRANSFORM_PLAYER, pkt); writer.Put(data); diff --git a/ClientTester/EchoClientTester/Vector3.cs b/ClientTester/EchoClientTester/Vector3.cs index 56b9853..16fea96 100644 --- a/ClientTester/EchoClientTester/Vector3.cs +++ b/ClientTester/EchoClientTester/Vector3.cs @@ -2,7 +2,7 @@ namespace ClientTester; public class Vector3 { - public int X { get; set; } - public int Y { get; set; } - public int Z { get; set; } + public float X { get; set; } + public float Y { get; set; } + public float Z { get; set; } } diff --git a/ClientTester/EchoClientTester/appsettings.json b/ClientTester/EchoClientTester/appsettings.json new file mode 100644 index 0000000..f0ce186 --- /dev/null +++ b/ClientTester/EchoClientTester/appsettings.json @@ -0,0 +1,6 @@ +{ + "ServerIp": "localhost", + "ServerPort": 9500, + "ConnectionKey": "test", + "ClientCount": 80 +}