mirror of https://github.com/teverse/teverse
Compare commits
2 Commits
a29d234bd6
...
698cc12615
Author | SHA1 | Date |
---|---|---|
Jay | 698cc12615 | |
Jay | 94c5c8fb92 |
|
@ -40,7 +40,6 @@ local function setupCharacterLocally(client, char)
|
|||
end
|
||||
|
||||
local function characterSpawnedHandler(newClientId)
|
||||
repeat wait() until engine.networking.me -- we shouldnt need to do this
|
||||
print("spawning", newClientId, engine.networking.me.id)
|
||||
if engine.networking.me.id == newClientId then
|
||||
print("waiting")
|
||||
|
@ -63,10 +62,6 @@ local function characterSpawnedHandler(newClientId)
|
|||
end
|
||||
end
|
||||
|
||||
for _,v in pairs(engine.networking.clients.children) do
|
||||
characterSpawnedHandler(v.id)
|
||||
end
|
||||
|
||||
engine.networking.clients:clientConnected(function (client)
|
||||
characterSpawnedHandler(client.id)
|
||||
end)
|
||||
|
@ -174,4 +169,7 @@ engine.input:keyReleased(function (inputObj)
|
|||
end
|
||||
end)
|
||||
|
||||
repeat print(engine.networking.me) wait() until engine.networking.me
|
||||
characterSpawnedHandler(engine.networking.me.id)
|
||||
|
||||
return controller
|
|
@ -9,4 +9,13 @@ print("Loaded Client")
|
|||
require("tevgit:core/client/debug.lua")
|
||||
require("tevgit:core/client/chat.lua")
|
||||
require("tevgit:core/client/playerList.lua")
|
||||
require("tevgit:core/client/characterController.lua")
|
||||
require("tevgit:core/client/characterController.lua")
|
||||
|
||||
workspace.camera.position = vector3(40, 15, 0)
|
||||
workspace.camera:lookAt(vector3(0, 0, 0))
|
||||
|
||||
engine.construct("block", workspace, {
|
||||
position = vector3(0, 10, 0),
|
||||
static = false,
|
||||
colour = colour(0.3, 0.3, 0.3)
|
||||
})
|
|
@ -40,11 +40,13 @@ return {
|
|||
name = "blueSphere",
|
||||
colour = colour(0, 0, 1),
|
||||
size = vector3(1, 1, 1),
|
||||
position = vector3(0.5, 1, 0),
|
||||
position = vector3(0.5, 5, 0),
|
||||
mesh = "primitive:sphere",
|
||||
roughness = 0.5,
|
||||
metalness = 0.8
|
||||
metalness = 0.8,
|
||||
static = false
|
||||
})
|
||||
engine.physics:resume()
|
||||
end,
|
||||
|
||||
setupEnvironment = function ()
|
||||
|
|
Loading…
Reference in New Issue