mirror of
https://github.com/CFC-Servers/cfc_time.git
synced 2025-03-04 03:03:20 -05:00
Revert change, use playerinit time instead
This commit is contained in:
parent
3a7204d7a3
commit
7dcde26ef1
@ -13,7 +13,7 @@ function plyMeta:GetUTime()
|
||||
end
|
||||
|
||||
function plyMeta:GetUTimeStart()
|
||||
return self:GetNWFloat( "CFC_Time_SessionStart", CurTime() )
|
||||
return self:GetNWFloat( "CFC_UTime_Compat_SessionStart", CurTime() )
|
||||
end
|
||||
|
||||
function plyMeta:GetUTimeSessionTime()
|
||||
@ -70,7 +70,6 @@ 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 +81,10 @@ if SERVER then
|
||||
timeStruct.add( totalUtime )
|
||||
end )
|
||||
|
||||
hook.Add( "PlayerInitialSpawn", "CFC_Time_UtimeCompat", function( ply )
|
||||
ply:SetNWFloat( "CFC_UTime_Compat_SessionStart", CurTime() )
|
||||
end )
|
||||
|
||||
hook.Add( "CFC_Time_PlayerTimeUpdated", "CFC_Time_UtimeCompat", function( ply, totalTime )
|
||||
ply:SetNWFloat( "TotalUTime", totalTime )
|
||||
end )
|
||||
|
Loading…
Reference in New Issue
Block a user