1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

organizing stuff.

This commit is contained in:
Perttu Ahola 2010-12-21 18:08:24 +02:00
parent 3b0bff2f74
commit 3f5bad938a
23 changed files with 805 additions and 374 deletions

View file

@ -398,6 +398,18 @@ public:
//void SendSectorMeta(u16 peer_id, core::list<v2s16> ps, u8 ver);
core::list<PlayerInfo> getPlayerInfo();
u32 getDayNightRatio()
{
s32 d = 8;
s32 t = (((m_time_of_day.get() + 24000/d/2)%24000)/(24000/d));
if(t == d/4 || t == (d-d/4))
return 600;
else if(t < d/4 || t > (d-d/4))
return 300;
else
return 1000;
}
private: