diff options
Diffstat (limited to 'client/main.lua')
-rw-r--r-- | client/main.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/client/main.lua b/client/main.lua index 6572621..2fad49e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -24,7 +24,7 @@ local host,peer local chunk -local f3mode = true +local f3mode = false function love.keypressed(key,scancode,isrepeat) if scancode == "f3" then f3mode = not f3mode end @@ -58,8 +58,8 @@ local function update_local_player(pl,dt) end if dx ~= 0 and dy ~= 0 then - dx = dx / math.sqrt(2) - dy = dy / math.sqrt(2) + dx = dx * 0.5 + dy = dy * (math.sqrt(3)/2) end pl.pos.x = pl.pos.x + SPEED * dt * dx @@ -91,11 +91,11 @@ function love.update(dt) local mh = camera:screen_to_world(Pos.make(love.mouse.getPosition())):to_hex():round() if false== chunk:at(mh) and love.mouse.isDown(1) then chunk:set_at(mh,true) - print(mh,true) + -- print(mh,true) send_settile(mh,true) elseif chunk:at(mh) and love.mouse.isDown(2) then chunk:set_at(mh,false) - print(mh,false) + -- print(mh,false) send_settile(mh,false) end end @@ -164,7 +164,9 @@ function love.draw() "mh "..tostring(hm).." "..tostring(hm:round()), "-", "pw "..tostring(local_player.pos), - "ph "..tostring(local_player.pos:to_hex()).." "..tostring(local_player.pos:to_hex():round()) + "ph "..tostring(local_player.pos:to_hex()).." "..tostring(local_player.pos:to_hex():round()), + "-", + "voob "..tostring(camera.zoom), },10,10) end end |