Cpp11 initializers: last src root changeset (#6022)
[oweals/minetest.git] / src / remoteplayer.cpp
index 2dbfe9d9d964021c493459a730e3a2432f90b082..c276062c2ad50552ff6eea70ffc94ca516fb7bf1 100644 (file)
@@ -36,15 +36,7 @@ float RemotePlayer::m_setting_chat_message_limit_per_10sec = 0.0f;
 u16 RemotePlayer::m_setting_chat_message_limit_trigger_kick = 0;
 
 RemotePlayer::RemotePlayer(const char *name, IItemDefManager *idef):
-       Player(name, idef),
-       protocol_version(0),
-       m_sao(NULL),
-       m_dirty(false),
-       m_last_chat_message_sent(time(NULL)),
-       m_chat_message_allowance(5.0f),
-       m_message_rate_overhead(0),
-       hud_hotbar_image(""),
-       hud_hotbar_selected_image("")
+       Player(name, idef)
 {
        if (!RemotePlayer::m_setting_cache_loaded) {
                RemotePlayer::m_setting_chat_message_limit_per_10sec =
@@ -65,6 +57,14 @@ RemotePlayer::RemotePlayer(const char *name, IItemDefManager *idef):
        movement_liquid_fluidity_smooth = g_settings->getFloat("movement_liquid_fluidity_smooth") * BS;
        movement_liquid_sink            = g_settings->getFloat("movement_liquid_sink")            * BS;
        movement_gravity                = g_settings->getFloat("movement_gravity")                * BS;
+
+       // copy defaults
+       m_cloud_params.density = 0.4f;
+       m_cloud_params.color_bright = video::SColor(229, 240, 240, 255);
+       m_cloud_params.color_ambient = video::SColor(255, 0, 0, 0);
+       m_cloud_params.height = 120.0f;
+       m_cloud_params.thickness = 16.0f;
+       m_cloud_params.speed = v2f(0.0f, -2.0f);
 }
 
 void RemotePlayer::serializeExtraAttributes(std::string &output)