X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fenvironment.h;h=b35ca42496b175bd4eea290b42faac9d2faddc68;hb=87b9cdab07f70a7f2dd6531650242b0893eb5930;hp=761e9068bed2998cba352ecc7345c3d572daf1df;hpb=7f8f9785d7e9e120a6708d2f51e32dfef3e50c19;p=dragonfireclient.git diff --git a/src/environment.h b/src/environment.h index 761e9068b..b35ca4249 100644 --- a/src/environment.h +++ b/src/environment.h @@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include +#include #include #include "irr_v3d.h" #include "activeobject.h" @@ -305,7 +306,7 @@ class ServerEnvironment : public Environment bool swapNode(v3s16 p, const MapNode &n); // Find all active objects inside a radius around a point - std::set getObjectsInsideRadius(v3f pos, float radius); + void getObjectsInsideRadius(std::vector &objects, v3f pos, float radius); // Clear all objects, loading and going through every MapBlock void clearAllObjects(); @@ -378,7 +379,7 @@ class ServerEnvironment : public Environment // Active object list std::map m_active_objects; // Outgoing network message buffer for active objects - std::list m_active_object_messages; + std::queue m_active_object_messages; // Some timers float m_send_recommended_timer; IntervalLimiter m_object_management_interval; @@ -393,7 +394,7 @@ class ServerEnvironment : public Environment u32 m_game_time; // A helper variable for incrementing the latter float m_game_time_fraction_counter; - std::list m_abms; + std::vector m_abms; // An interval for generally sending object positions and stuff float m_recommended_send_interval; // Estimate for general maximum lag as determined by server. @@ -404,6 +405,8 @@ class ServerEnvironment : public Environment #ifndef SERVER #include "clientobject.h" +#include "content_cao.h" + class ClientSimpleObject; /* @@ -466,6 +469,7 @@ class ClientEnvironment : public Environment ActiveObjects */ + GenericCAO* getGenericCAO(u16 id); ClientActiveObject* getActiveObject(u16 id); /* @@ -501,7 +505,7 @@ class ClientEnvironment : public Environment // Get event from queue. CEE_NONE is returned if queue is empty. ClientEnvEvent getClientEvent(); - u16 m_attachements[USHRT_MAX]; + u16 attachement_parent_ids[USHRT_MAX + 1]; std::list getPlayerNames() { return m_player_names; } @@ -521,7 +525,7 @@ class ClientEnvironment : public Environment IGameDef *m_gamedef; IrrlichtDevice *m_irr; std::map m_active_objects; - std::list m_simple_objects; + std::vector m_simple_objects; std::list m_client_event_queue; IntervalLimiter m_active_object_light_update_interval; IntervalLimiter m_lava_hurt_interval;