diff --git a/script/game.js b/script/game.js index a424b5c..751e324 100644 --- a/script/game.js +++ b/script/game.js @@ -298,7 +298,7 @@ function move_camera() { } function open_socket() { - server = new WebSocket("ws://NUC-server-1:8080"); + server = new WebSocket(server_url); server.onopen = function() { server.send(JSON.stringify({ "type": "init", @@ -334,7 +334,7 @@ function send_position_to_server() { var interact_interval; var punching = false; var mouse_down = false; -document.body.onmousedown = function() { +document.body.onmousedown = function() { mouse_down = true; } document.body.onmouseup = function() { @@ -365,4 +365,4 @@ function interaction_animation(start_time) { rotation_offset = 0; punching = false; } -} \ No newline at end of file +}