From 4e5d2c36e91aeddae1e8a009a49c99031afc88e5 Mon Sep 17 00:00:00 2001 From: blashyrk Date: Mon, 15 Dec 2014 17:45:42 +0100 Subject: Updated cPlayer::DoMoveToWorld to send target world's weather info to Player --- src/Entities/Player.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 8d2eb1e5f..abeeef6a5 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1604,6 +1604,10 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn) // Update the view distance. m_ClientHandle->SetViewDistance(m_ClientHandle->GetRequestedViewDistance()); + // Send current weather of target world to player + if (a_World->GetDimension() == dimOverworld) + m_ClientHandle->SendWeather(a_World->GetWeather()); + return true; } -- cgit v1.2.3 From b9977a39c35ff3c61bfc15f99b3dd12b5ff245f4 Mon Sep 17 00:00:00 2001 From: gushromp Date: Mon, 15 Dec 2014 18:41:47 +0100 Subject: Added braces to 'if' according to the code guidelines --- src/Entities/Player.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index abeeef6a5..15920d6cf 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1606,7 +1606,9 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn) // Send current weather of target world to player if (a_World->GetDimension() == dimOverworld) + { m_ClientHandle->SendWeather(a_World->GetWeather()); + } return true; } -- cgit v1.2.3