feat : Vector3 int -> float, 이동시 int 캐스팅 제거, 프로그램 실행시 setting.json 추가

This commit is contained in:
qornwh1
2026-03-12 16:49:23 +09:00
parent d626a7156d
commit 3d62cbf58d
4 changed files with 15 additions and 9 deletions

View File

@@ -125,8 +125,8 @@ public class DummyClients
distance = hitWall ? 0f : distance - step; distance = hitWall ? 0f : distance - step;
// 정수 Vector3 갱신 // 정수 Vector3 갱신
position.X = (int)MathF.Round(posX); position.X = posX;
position.Z = (int)MathF.Round(posZ); position.Z = posZ;
} }
public void SendTransform() public void SendTransform()
@@ -144,7 +144,7 @@ public class DummyClients
Position = new Packet.Position Position = new Packet.Position
{ {
X = position.X, X = position.X,
Y = 0, // 높이는 버린다. Y = -0.5f, // 높이는 버린다.
Z = position.Z Z = position.Z
} }
}; };

View File

@@ -144,15 +144,15 @@ public class StressTestClient
posX = nextX; posX = nextX;
posZ = nextZ; posZ = nextZ;
distance = hitWall ? 0f : distance - step; distance = hitWall ? 0f : distance - step;
position.X = (int)MathF.Round(posX); position.X = posX;
position.Z = (int)MathF.Round(posZ); position.Z = posZ;
// 전송 // 전송
TransformPlayerPacket pkt = new TransformPlayerPacket TransformPlayerPacket pkt = new TransformPlayerPacket
{ {
PlayerId = clientId, PlayerId = clientId,
RotY = rotY, 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); byte[] data = PacketSerializer.Serialize((ushort)PacketCode.TRANSFORM_PLAYER, pkt);
writer.Put(data); writer.Put(data);

View File

@@ -2,7 +2,7 @@ namespace ClientTester;
public class Vector3 public class Vector3
{ {
public int X { get; set; } public float X { get; set; }
public int Y { get; set; } public float Y { get; set; }
public int Z { get; set; } public float Z { get; set; }
} }

View File

@@ -0,0 +1,6 @@
{
"ServerIp": "localhost",
"ServerPort": 9500,
"ConnectionKey": "test",
"ClientCount": 80
}