diff options
Diffstat (limited to 'client/game.lua')
-rw-r--r-- | client/game.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/client/game.lua b/client/game.lua index 1a6cd54..e219fef 100644 --- a/client/game.lua +++ b/client/game.lua @@ -116,7 +116,12 @@ local function draw_player(pl,islocal) end if pl.username then - util.print_good(pl.username, pl.pos.x, pl.pos.y) + -- think of a better way to unscale but keep transformation + love.graphics.push() + love.graphics.translate(pl.pos.x, pl.pos.y) + love.graphics.scale(1/camera.zoom) + util.print_good(pl.username, 0, 0) + love.graphics.pop() end end @@ -189,7 +194,8 @@ local function handle_net() local pl = j.pl remote_players[pl.id] = { pos=coords.Pos:make(pl.x,pl.y), - color=pl.color, id=pl.id + color=pl.color, id=pl.id, + username = pl.username, } msgbox.add(pl.id.." joined") elseif op == "leave" then @@ -205,7 +211,8 @@ local function handle_net() local pl = j.pl local_player = { pos=coords.Pos:make(pl.x,pl.y), - color=pl.color, id=pl.id, username=pl.username + color=pl.color, id=pl.id, + username=pl.username, } elseif op == "chunk" then local ch = ChunkC:from_packet_data(j) |