diff options
author | sfan5 <sfan5@live.de> | 2020-05-26 17:38:31 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-27 21:58:40 +0200 |
commit | 471e567657dfd75a994a1b54d7a23cf4541a6bed (patch) | |
tree | 1b909e24669141f3fba2a6d98c68e22f1288249b /src/client | |
parent | 2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2 (diff) | |
download | minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.tar.gz minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.tar.bz2 minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.zip |
Value copy / allocation optimizations mostly in server, SAO and serialize code
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/game.cpp | 2 | ||||
-rw-r--r-- | src/client/sky.cpp | 4 | ||||
-rw-r--r-- | src/client/sky.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index e7663a113..cdf4da21e 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2806,7 +2806,7 @@ void Game::handleClientEvent_SetSky(ClientEvent *event, CameraOrientation *cam) // Shows the mesh skybox sky->setVisible(true); // Update mesh based skybox colours if applicable. - sky->setSkyColors(*event->set_sky); + sky->setSkyColors(event->set_sky->sky_color); sky->setHorizonTint( event->set_sky->fog_sun_tint, event->set_sky->fog_moon_tint, diff --git a/src/client/sky.cpp b/src/client/sky.cpp index d21b56fcc..2e0cbca86 100644 --- a/src/client/sky.cpp +++ b/src/client/sky.cpp @@ -907,9 +907,9 @@ void Sky::setStarCount(u16 star_count, bool force_update) } } -void Sky::setSkyColors(const SkyboxParams sky) +void Sky::setSkyColors(const SkyColor &sky_color) { - m_sky_params.sky_color = sky.sky_color; + m_sky_params.sky_color = sky_color; } void Sky::setHorizonTint(video::SColor sun_tint, video::SColor moon_tint, diff --git a/src/client/sky.h b/src/client/sky.h index 8637f96d4..3227e8f59 100644 --- a/src/client/sky.h +++ b/src/client/sky.h @@ -94,7 +94,7 @@ public: m_bgcolor = bgcolor; m_skycolor = skycolor; } - void setSkyColors(const SkyboxParams sky); + void setSkyColors(const SkyColor &sky_color); void setHorizonTint(video::SColor sun_tint, video::SColor moon_tint, std::string use_sun_tint); void setInClouds(bool clouds) { m_in_clouds = clouds; } |