clear submodules

This commit is contained in:
wan-may 2023-09-19 02:48:14 -03:00
parent 7308086139
commit 6d623dec28
7 changed files with 10 additions and 16 deletions

9
.gitmodules vendored
View File

@ -1,9 +0,0 @@
[submodule "lib/love-gltf"]
path = lib/love-gltf
url = https://gitlab.com/Alloyed/love-gltf.git
[submodule "lib/luasocket"]
path = lib/luasocket
url = https://github.com/lunarmodules/luasocket
[submodule "lib/lua54"]
path = lib/lua54
url = https://github.com/walterschell/Lua.git

2
src/client.bat Normal file
View File

@ -0,0 +1,2 @@
D:/dev/love/love.exe "./client/"
pause

2
src/metaserver.bat Normal file
View File

@ -0,0 +1,2 @@
D:/dev/love/love.exe "./metaserver/"
pause

View File

@ -1,3 +1 @@
local http = assert( require 'socket.http' )
print( "Retrieving IP: " )
return assert( http.request 'https://api.ipify.org' )
assert( assert( require 'socket.http' ).request 'https://api.ipify.org' ) == '142.162.167.92'

View File

@ -6,7 +6,7 @@ local socket = assert( require 'socket' )
local packet = assert( shared.packet )
local udp = assert( socket.udp() )
udp:settimeout(0)
assert( udp:setsockname( shared.metaserver.ip, shared.metaserver.port ) )
assert( udp:setsockname( socket.dns.toip(socket.dns.gethostname()), shared.metaserver.port ))
--Servers broadcast their information here.
--The metaserver builds a list of available servers. ( available meaning, "broadcasted in last ten heartbeats" )
@ -83,7 +83,7 @@ local function prune( t )
end
end
print( "Starting Metaserver", socket.gettime() )
print( "Starting Metaserver", os.time(), udp:getsockname() )
function love.update()
read( udp:receivefrom() )
prune( socket.gettime() )

2
src/server.bat Normal file
View File

@ -0,0 +1,2 @@
D:/dev/love/love.exe "./server/"
pause

View File

@ -1,2 +1 @@
local socket = assert( require 'socket' )
return { ip = socket.dns.toip(socket.dns.gethostname()), port = 42069 }
return { ip = '142.162.167.92', port = 42069 }