]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/environment.h
Improve lighting of entities.
[dragonfireclient.git] / src / environment.h
index 1a1debcb9dab5824bbe3ea4ed050e1450cf71d5f..b4884fdb3849ae38f3ab4a9f97ef7ae06383688d 100644 (file)
@@ -76,6 +76,16 @@ class Environment
 
        u32 getDayCount();
 
+       /*!
+        * Returns false if the given line intersects with a
+        * non-air node, true otherwise.
+        * \param pos1 start of the line
+        * \param pos2 end of the line
+        * \param p output, position of the first non-air node
+        * the line intersects
+        */
+       bool line_of_sight(v3f pos1, v3f pos2, v3s16 *p = nullptr);
+
        /*!
         * Gets the objects pointed by the shootline as
         * pointed things.
@@ -106,7 +116,7 @@ class Environment
 
        /*
         * Below: values managed by m_time_lock
-       */
+        */
        // Time of day in milli-hours (0-23999), determines day and night
        u32 m_time_of_day;
        // Time of day in 0...1
@@ -122,7 +132,7 @@ class Environment
        std::atomic<u32> m_day_count;
        /*
         * Above: values managed by m_time_lock
-       */
+        */
 
        /* TODO: Add a callback function so these can be updated when a setting
         *       changes.  At this point in time it doesn't matter (e.g. /set
@@ -137,6 +147,7 @@ class Environment
        float m_cache_active_block_mgmt_interval;
        float m_cache_abm_interval;
        float m_cache_nodetimer_interval;
+       float m_cache_abm_time_budget;
 
        IGameDef *m_gamedef;