Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions KISSMultiplayer/lua/ge/extensions/network.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ local time_offset_smoother = {
current_sample = 1,
}

local ogPushPauseRequest = nil
local ogPopPauseRequest = nil

time_offset_smoother.get = function(new_sample)
if time_offset_smoother.current_sample < 30 then
time_offset_smoother.samples[time_offset_smoother.current_sample] = new_sample
Expand Down Expand Up @@ -85,6 +88,9 @@ local function disconnect(data)
--Lua:requestReload()
--kissutils.hooks.clear()
returnToMainMenu()

simTimeAuthority.pushPauseRequest = ogPushPauseRequest
simTimeAuthority.popPauseRequest = ogPopPauseRequest
end

local function handle_disconnected(data)
Expand Down Expand Up @@ -379,6 +385,12 @@ local function connect(addr, player_name, is_public)
end
kissrichpresence.update()
kissui.chat.add_message("Connected!")

ogPushPauseRequest = simTimeAuthority.pushPauseRequest
ogPopPauseRequest = simTimeAuthority.popPauseRequest

simTimeAuthority.pushPauseRequest = function() end
simTimeAuthority.popPauseRequest = function() end
end

local function send_messagepack(data_type, reliable, data)
Expand Down