mirror of https://github.com/teverse/teverse
Compare commits
No commits in common. "d158723832fec496d46e60e9940e7c6d5030d524" and "5c70b55a67590c9f617b4cb766057bb5aeb7eb12" have entirely different histories.
d158723832
...
5c70b55a67
|
@ -41,7 +41,7 @@ end
|
||||||
|
|
||||||
local function characterSpawnedHandler(newClientId)
|
local function characterSpawnedHandler(newClientId)
|
||||||
repeat wait() until engine.networking.me -- we shouldnt need to do this
|
repeat wait() until engine.networking.me -- we shouldnt need to do this
|
||||||
print("spawning", newClientId, engine.networking.me.id)
|
print("spawning")
|
||||||
if engine.networking.me.id == newClientId then
|
if engine.networking.me.id == newClientId then
|
||||||
print("waiting")
|
print("waiting")
|
||||||
repeat wait() until workspace[engine.networking.me.id]
|
repeat wait() until workspace[engine.networking.me.id]
|
||||||
|
|
|
@ -35,7 +35,7 @@ update = function(client, cameraDirection)
|
||||||
return moved
|
return moved
|
||||||
end
|
end
|
||||||
|
|
||||||
function onConnection(client)
|
engine.networking.clients:clientConnected(function (client)
|
||||||
wait(1)
|
wait(1)
|
||||||
print("spawning", client.id)
|
print("spawning", client.id)
|
||||||
local char = engine.construct("block", workspace, {
|
local char = engine.construct("block", workspace, {
|
||||||
|
@ -78,13 +78,7 @@ function onConnection(client)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
controller.characters[client] = { updating=false, character = char, keys = {false,false,false,false}, speed = controller.defaultSpeed }
|
controller.characters[client] = { updating=false, character = char, keys = {false,false,false,false}, speed = controller.defaultSpeed }
|
||||||
end
|
end)
|
||||||
|
|
||||||
for _,v in pairs(engine.networking.clients.children) do
|
|
||||||
onConnection(v)
|
|
||||||
end
|
|
||||||
|
|
||||||
engine.networking.clients:clientConnected(onConnection)
|
|
||||||
|
|
||||||
engine.networking.clients:clientDisconnected(function (client) wait(1)
|
engine.networking.clients:clientDisconnected(function (client) wait(1)
|
||||||
if controller.characters[client] then
|
if controller.characters[client] then
|
||||||
|
|
|
@ -26,32 +26,6 @@ local tabs = {
|
||||||
{"Settings", "fa:s-cog", function ()
|
{"Settings", "fa:s-cog", function ()
|
||||||
shared.windows.settings.visible = not shared.windows.settings.visible
|
shared.windows.settings.visible = not shared.windows.settings.visible
|
||||||
end},
|
end},
|
||||||
{"Test", "fa:s-satellite-dish", function ()
|
|
||||||
if not shared.workshop.gameFilePath or shared.workshop.gameFilePath == "" then
|
|
||||||
ui.prompt("Please save this game before testing.")
|
|
||||||
else
|
|
||||||
|
|
||||||
local content = engine.construct("guiTextBox", shared.workshop.interface, {
|
|
||||||
name = "_loadingTest",
|
|
||||||
backgroundAlpha = 0,
|
|
||||||
textAlpha = 0,
|
|
||||||
backgroundColour = colour:black(),
|
|
||||||
size = guiCoord(1, 0, 1, 0),
|
|
||||||
position = guiCoord(0, 0, 0, 0),
|
|
||||||
zIndex = 5000,
|
|
||||||
fontSize = 24,
|
|
||||||
align = enums.align.middle,
|
|
||||||
text = "Uploading to Remote Testing Server\nServer: London"
|
|
||||||
})
|
|
||||||
|
|
||||||
engine.tween:begin(content, 1, {
|
|
||||||
backgroundAlpha = 0.95,
|
|
||||||
textAlpha = 1
|
|
||||||
}, "inOutQuad")
|
|
||||||
|
|
||||||
shared.workshop:remoteTestServer()
|
|
||||||
end
|
|
||||||
end},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue