diff options
author | ubq323 <ubq323@ubq323.website> | 2023-02-25 15:09:58 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-02-25 15:09:58 +0000 |
commit | 242a0b4e7deb356a0015fbf536158962ad2ea29c (patch) | |
tree | 534e6e975ba08d013c1a518729775ccde5eee7d0 /server | |
parent | 41a7a40ecf71613c6cb3f7823491c45d9c9c63e0 (diff) |
move player size to constants.lua; fix channel-related bug where player movement wasn't being recieved properly
Diffstat (limited to 'server')
-rw-r--r-- | server/server.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/server.lua b/server/server.lua index 03a5fd9..097bc99 100644 --- a/server/server.lua +++ b/server/server.lua @@ -9,7 +9,7 @@ local MapS = require"map".MapS local posix_time = require"posix.time" math.randomseed(os.time()) -local host = enet.host_create("*:8473") +local host = enet.host_create("*:8473",nil,2) print(host:get_socket_address()) -- sequential list of all players @@ -96,6 +96,7 @@ local function handle_ev(ev) local player = player_by_peer(ev.peer) if not player then error("sneezey "..ev.peer) end local j = json.decode(ev.data) + -- print(ev.channel,ev.data) local op = j.t if op == "ppos" then local x,y = j.x,j.y |