std::list<Player*> getPlayers(bool ignore_disconnected);
u32 getDayNightRatio();
-
+
// 0-23999
virtual void setTimeOfDay(u32 time)
{
float getTimeOfDaySpeed()
{ return m_time_of_day_speed; }
+ void setDayNightRatioOverride(bool enable, u32 value)
+ {
+ m_enable_day_night_ratio_override = enable;
+ m_day_night_ratio_override = value;
+ }
+
protected:
// peer_ids in here should be unique, except that there may be many 0s
std::list<Player*> m_players;
float m_time_of_day_speed;
// Used to buffer dtime for adding to m_time_of_day
float m_time_counter;
+ // Overriding the day-night ratio is useful for custom sky visuals
+ bool m_enable_day_night_ratio_override;
+ u32 m_day_night_ratio_override;
};
/*
}
std::set<v3s16> m_list;
+ std::set<v3s16> m_forceloaded_list;
private:
};
// Script-aware node setters
bool setNode(v3s16 p, const MapNode &n);
bool removeNode(v3s16 p);
+ bool swapNode(v3s16 p, const MapNode &n);
// Find all active objects inside a radius around a point
std::set<u16> getObjectsInsideRadius(v3f pos, float radius);
void step(f32 dtime);
//check if there's a line of sight between two positions
- bool line_of_sight(v3f pos1, v3f pos2, float stepsize=1.0);
+ bool line_of_sight(v3f pos1, v3f pos2, float stepsize=1.0, v3s16 *p=NULL);
u32 getGameTime() { return m_game_time; }
void reportMaxLagEstimate(float f) { m_max_lag_estimate = f; }
float getMaxLagEstimate() { return m_max_lag_estimate; }
+
+ // is weather active in this environment?
+ bool m_use_weather;
+
+ std::set<v3s16>* getForceloadedBlocks() { return &m_active_blocks.m_forceloaded_list; };
+
private:
/*