diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-08-07 01:07:32 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-08-07 01:07:32 +0200 |
commit | 4271d719b68521f91770574b3064525512116670 (patch) | |
tree | 2b71382d4917b6131cb8c3cffa94501063c81512 /src/ClientHandle.cpp | |
parent | Merge pull request #1291 from mc-server/RedstoneCleanUp (diff) | |
download | cuberite-4271d719b68521f91770574b3064525512116670.tar cuberite-4271d719b68521f91770574b3064525512116670.tar.gz cuberite-4271d719b68521f91770574b3064525512116670.tar.bz2 cuberite-4271d719b68521f91770574b3064525512116670.tar.lz cuberite-4271d719b68521f91770574b3064525512116670.tar.xz cuberite-4271d719b68521f91770574b3064525512116670.tar.zst cuberite-4271d719b68521f91770574b3064525512116670.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 3e046f38d..286c17513 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -342,7 +342,16 @@ void cClientHandle::Authenticate(const AString & a_Name, const AString & a_UUID, } // Send time - m_Protocol->SendTimeUpdate(World->GetWorldAge(), World->GetTimeOfDay()); + Int64 TimeOfDay = World->GetTimeOfDay(); + if (!World->IsDaylightCycleEnabled()) + { + TimeOfDay *= -1; + if (TimeOfDay == 0) + { + TimeOfDay = -1; + } + } + m_Protocol->SendTimeUpdate(World->GetWorldAge(), TimeOfDay); // Send contents of the inventory window m_Protocol->SendWholeInventory(*m_Player->GetWindow()); |