diff --git a/apps/server/src/managers/GameManager.ts b/apps/server/src/managers/GameManager.ts index 899a6c2..1ba317e 100644 --- a/apps/server/src/managers/GameManager.ts +++ b/apps/server/src/managers/GameManager.ts @@ -48,23 +48,8 @@ // クライアント側で計算済みの座標(x, y)が送られてくるので、 // ここで speed を掛けたり、+= で足したりしてはいけません。 // そのまま「代入」するのが正解です。 - - let nextX = x; - let nextY = y; - - const MAP_SIZE = 2000; - const PLAYER_SIZE = 20; - - // 画面端の制限(クランプ処理) - // 0 〜 2000 の範囲からはみ出さないようにする - if (nextX < 0) nextX = 0; - if (nextX > MAP_SIZE - PLAYER_SIZE) nextX = MAP_SIZE - PLAYER_SIZE; - if (nextY < 0) nextY = 0; - if (nextY > MAP_SIZE - PLAYER_SIZE) nextY = MAP_SIZE - PLAYER_SIZE; - - // 位置を更新 - player.x = nextX; - player.y = nextY; + player.x = x; + player.y = y; } }