Extend RDB_PlayerSnapshot to register onTick with OnTickEvenPaused for paused server state handling
This commit is contained in:
@@ -145,6 +145,8 @@ local function onTick()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Registered on BOTH OnTick and OnTickEvenPaused, same as
|
||||||
|
-- RDB_RequestPipeline.
|
||||||
function RDB_PlayerSnapshot.init()
|
function RDB_PlayerSnapshot.init()
|
||||||
if initialized then
|
if initialized then
|
||||||
return
|
return
|
||||||
@@ -152,5 +154,6 @@ function RDB_PlayerSnapshot.init()
|
|||||||
initialized = true
|
initialized = true
|
||||||
|
|
||||||
Events.OnTick.Add(onTick)
|
Events.OnTick.Add(onTick)
|
||||||
|
Events.OnTickEvenPaused.Add(onTick)
|
||||||
Events.OnCharacterDeath.Add(RDB_PlayerSnapshot.onCharacterDeath)
|
Events.OnCharacterDeath.Add(RDB_PlayerSnapshot.onCharacterDeath)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user