I have been working on adding ambient sounds on the client side and I have ran into a problem with getTimeOfDay. It's probably a C++ noob problem. I have created a new class, ambiance.cpp. In client.cpp I initialize m_ambiance in Client::Client and pass m_env to the ambiance class constructor (https://github.com/Bremaweb/minetest/bl ... t.cpp#L284). m_env works fine with .getLocalPlayer(), .getMap().getNodeNoEx(), etc... but when I use m_env.getTimeOfDay() it always returns 9000 (https://github.com/Bremaweb/minetest/bl ... e.cpp#L177).
Is anybody willing to shed some light on what I might have done wrong, or what .getTimeOfDay may be doing wrong?