X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclient.h;h=e8db7de44e73ce963bcc0bd72ef5d735f1735e35;hb=bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2;hp=68953d40216fe3e2150bc44d28cab4f4944f50d9;hpb=ff1ef67dccefb8d283142ea86db250f07aee095c;p=minetest.git diff --git a/src/client.h b/src/client.h index 68953d402..e8db7de44 100644 --- a/src/client.h +++ b/src/client.h @@ -77,6 +77,7 @@ enum ClientEventType CE_HUDCHANGE, CE_SET_SKY, CE_OVERRIDE_DAY_NIGHT_RATIO, + CE_CLOUD_PARAMS, }; struct ClientEvent @@ -178,6 +179,15 @@ struct ClientEvent bool do_override; float ratio_f; } override_day_night_ratio; + struct { + f32 density; + u32 color_bright; + u32 color_ambient; + f32 height; + f32 thickness; + f32 speed_x; + f32 speed_y; + } cloud_params; }; }; @@ -318,6 +328,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef void handleCommand_ItemDef(NetworkPacket* pkt); void handleCommand_PlaySound(NetworkPacket* pkt); void handleCommand_StopSound(NetworkPacket* pkt); + void handleCommand_FadeSound(NetworkPacket *pkt); void handleCommand_Privileges(NetworkPacket* pkt); void handleCommand_InventoryFormSpec(NetworkPacket* pkt); void handleCommand_DetachedInventory(NetworkPacket* pkt); @@ -331,6 +342,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef void handleCommand_HudSetFlags(NetworkPacket* pkt); void handleCommand_HudSetParam(NetworkPacket* pkt); void handleCommand_HudSetSky(NetworkPacket* pkt); + void handleCommand_CloudParams(NetworkPacket* pkt); void handleCommand_OverrideDayNightRatio(NetworkPacket* pkt); void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt); void handleCommand_EyeOffset(NetworkPacket* pkt); @@ -414,7 +426,8 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef void updateCameraOffset(v3s16 camera_offset) { m_mesh_update_thread.m_camera_offset = camera_offset; } - // Get event from queue. CE_NONE is returned if queue is empty. + bool hasClientEvents() const { return !m_client_event_queue.empty(); } + // Get event from queue. If queue is empty, it triggers an assertion failure. ClientEvent getClientEvent(); bool accessDenied() const { return m_access_denied; } @@ -509,6 +522,8 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef void showGameFog(const bool show = true); void showGameDebug(const bool show = true); + IrrlichtDevice *getDevice() const { return m_device; } + private: // Virtual methods from con::PeerHandler