#include "threading/atomic.h"
#include "network/networkprotocol.h" // for AccessDeniedCode
+class IGameDef;
class Map;
class Environment
{
public:
// Environment will delete the map passed to the constructor
- Environment();
+ Environment(IGameDef *gamedef);
virtual ~Environment();
/*
*/
virtual void step(f32 dtime) = 0;
- virtual Map & getMap() = 0;
+ virtual Map &getMap() = 0;
u32 getDayNightRatio();
// counter used internally when triggering ABMs
u32 m_added_objects;
+ IGameDef *getGameDef() { return m_gamedef; }
protected:
GenericAtomic<float> m_time_of_day_speed;
float m_cache_abm_interval;
float m_cache_nodetimer_interval;
+ IGameDef *m_gamedef;
+
private:
Mutex m_time_lock;
};
#endif
-