use think hook on server

This commit is contained in:
Ayane Satomi 2022-08-02 00:53:01 +08:00
parent e4180140b4
commit 18ce360176
No known key found for this signature in database
GPG key ID: 431E3C36BEBE204B

View file

@ -57,7 +57,7 @@ if SERVER then
local prevName = ""
local prevSTime = ""
hook.add("tick", "serverTimeTick", function()
hook.add("think", "serverTimeTick", function()
if prevSTime ~= os.date() then
prevSTime = os.date()
net.start("serverTime")
@ -67,7 +67,7 @@ if SERVER then
end)
-- METASTRUCT SPECIFIC HOOK
hook.add("tick", "e621", function()
hook.add("think", "e621", function()
if prevName ~= game.getHostname() then
prevName = game.getHostname()
net.start("serverName")