summaryrefslogtreecommitdiff
path: root/client/main.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-02-06 12:35:20 +0000
committerubq323 <ubq323@ubq323.website>2023-02-06 12:35:20 +0000
commit911dc535a9930ef5380ecf31fabbd5123461fc3c (patch)
tree19e651f2bf2e5b55410399cc284e4c5c4afa4c69 /client/main.lua
parent820335d1e930e354f300610b653907ed6f70150a (diff)
remove chunk loading debugging prints, add envvar for localness
Diffstat (limited to 'client/main.lua')
-rw-r--r--client/main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/main.lua b/client/main.lua
index d6f9e60..43705fe 100644
--- a/client/main.lua
+++ b/client/main.lua
@@ -1,8 +1,9 @@
local enet = require"enet"
local json = require"common.dkjson"
--- local SERVER_HOSTNAME = "ubq323.website"
-local SERVER_HOSTNAME = "localhost"
+
+local SERVER_HOSTNAME = "ubq323.website"
+if os.getenv"HEXEMU_LOCAL" then SERVER_HOSTNAME = "localhost" end
local PLAYER_SIZE = 0.7
local local_player = nil
@@ -109,7 +110,6 @@ function love.update(dt)
-- load chunks near to player (within 3x3 square)
for _,cp in ipairs(player_cp:neighborhood()) do
if map:chunk(cp) == nil then
- print("sending chunk request",cp)
map:mark_chunk_loading(cp)
peer:send(json.encode{t="reqchunk",u=cp.u,v=cp.v})
end