X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserverenvironment.h;h=cfd5b8f3eb7e3b6f5426ea0de4aa7a6b0bcaacde;hb=e3bd6704a0eb65e9490347680441c7a08df36f7a;hp=f814b95c0297bdadba410dc40dc889f2141e5956;hpb=e8ac5a31cf12afcfddf8e3ed31e8038930edb06f;p=minetest.git diff --git a/src/serverenvironment.h b/src/serverenvironment.h index f814b95c0..cfd5b8f3e 100644 --- a/src/serverenvironment.h +++ b/src/serverenvironment.h @@ -289,9 +289,9 @@ class ServerEnvironment : public Environment /* Get the next message emitted by some active object. - Returns a message with id=0 if no messages are available. + Returns false if no messages are available, true otherwise. */ - ActiveObjectMessage getActiveObjectMessage(); + bool getActiveObjectMessage(ActiveObjectMessage *dest); virtual void getSelectedActiveObjects( const core::line3d &shootline_on_map, @@ -322,6 +322,9 @@ class ServerEnvironment : public Environment bool removeNode(v3s16 p); bool swapNode(v3s16 p, const MapNode &n); + // Find the daylight value at pos with a Depth First Search + u8 findSunlight(v3s16 pos) const; + // Find all active objects inside a radius around a point void getObjectsInsideRadius(std::vector &objects, const v3f &pos, float radius, std::function include_obj_cb) @@ -436,10 +439,11 @@ class ServerEnvironment : public Environment IntervalLimiter m_object_management_interval; // List of active blocks ActiveBlockList m_active_blocks; - IntervalLimiter m_database_check_interval; IntervalLimiter m_active_blocks_management_interval; IntervalLimiter m_active_block_modifier_interval; IntervalLimiter m_active_blocks_nodemetadata_interval; + // Whether the variables below have been read from file yet + bool m_meta_loaded = false; // Time from the beginning of the game in seconds. // Incremented in step(). u32 m_game_time = 0;