Merge branch 'core'

This commit is contained in:
Cooldude2606
2018-03-13 17:04:08 +00:00

View File

@@ -64,10 +64,8 @@ function Gui.set_dropdown_index(dropdown,_item)
return dropdown return dropdown
end end
local function _thread() Event.register(-1,function(event)
local thread = Server.get_thread('camera-follow') Server.new_thread{
if not thread then
thread = Server.new_thread{
name='camera-follow', name='camera-follow',
data={cams={},cam_index=1,players={}} data={cams={},cam_index=1,players={}}
}:on_event('tick',function(self) }:on_event('tick',function(self)
@@ -92,9 +90,12 @@ local function _thread()
table.remove(self.data.players[event.player_index],index) table.remove(self.data.players[event.player_index],index)
end end
end end
end) end):open()
thread:open() end)
end
local function _thread()
local thread = Server.get_thread('camera-follow')
if not thread then error('Camera Follow Thread Is Missing') end
return thread return thread
end end
--- Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity --- Adds a camera that updates every tick (or less depeading on how many are opening) it will move to follow an entity