This commit is contained in:
Brandon Sturgeon 2021-11-22 23:11:24 -08:00
parent 98f7f882dc
commit 04821ee4cc
No known key found for this signature in database
GPG Key ID: 93451558FC64495C

View File

@ -70,6 +70,7 @@ if SERVER then
end
hook.Add( "CFC_Time_PlayerInitialTime", "CFC_Time_UtimeCompat", function( ply, isFirstVisit, timeStruct )
ply:SetNWFloat( "UTimeStart", CurTime() )
if not isFirstVisit then return end
logger:debug( "[UtimeCompat] Received PlayerInitialTime hook for first-time player - migrating time!")
@ -82,6 +83,5 @@ if SERVER then
hook.Add( "CFC_Time_PlayerTimeUpdated", "CFC_Time_UtimeCompat", function( ply, totalTime )
ply:SetNWFloat( "TotalUTime", totalTime )
ply:SetNWFloat( "UTimeStart", CurTime() )
end )
end