mirror of
https://github.com/CFC-Servers/cfc_time.git
synced 2025-03-04 03:03:20 -05:00
Fix utimestart being constantly set
This commit is contained in:
parent
72eb668f0c
commit
c0adad57cb
@ -69,6 +69,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
|
||||
|
Loading…
Reference in New Issue
Block a user