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:
parent
3b0bff2f74
commit
3f5bad938a
23 changed files with 805 additions and 374 deletions
12
src/server.h
12
src/server.h
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue