From 2e90ed07acd295387c0da6c0689d14665b6c125d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 16 Mar 2012 16:34:30 +0200 Subject: Dynamic sky, fog and cloud colors; sun and moon --- src/client.cpp | 57 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 22 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 6d992e717..2148bfe59 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -247,14 +247,16 @@ Client::Client( m_animation_time(0), m_crack_level(-1), m_crack_pos(0,0,0), - m_time_of_day(0), m_map_seed(0), m_password(password), m_access_denied(false), m_texture_receive_progress(0), m_textures_received(false), m_itemdef_received(false), - m_nodedef_received(false) + m_nodedef_received(false), + m_time_of_day_set(false), + m_last_time_of_day_f(-1), + m_time_of_day_update_timer(0) { m_packetcounter_timer = 0.0; //m_delete_unused_sectors_timer = 0.0; @@ -333,6 +335,8 @@ void Client::step(float dtime) if(m_animation_time > 60.0) m_animation_time -= 60.0; + m_time_of_day_update_timer += dtime; + //infostream<<"Client steps "<