From 1ff15d3a46042d3432d9485249e4dc3b08dbc6ff Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 1 Jul 2018 13:47:50 +0200 Subject: [PATCH] Drop ClientEvent CEE_PLAYER_BREATH: triggering function is not called. Also drop 3 useless IntervalLimiter --- src/clientenvironment.cpp | 13 +------------ src/clientenvironment.h | 10 +--------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp index 76ac080d4..53e3f783a 100644 --- a/src/clientenvironment.cpp +++ b/src/clientenvironment.cpp @@ -203,10 +203,7 @@ void ClientEnvironment::step(float dtime) lplayer->move(dtime_part, this, position_max_increment, &player_collisions); } - } - while(dtime_downcount > 0.001); - - //std::cout<<"Looped "< 0.001); bool player_immortal = lplayer->getCAO() && lplayer->getCAO()->isImmortal(); @@ -483,14 +480,6 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp) m_client_event_queue.push(event); } -void ClientEnvironment::updateLocalPlayerBreath(u16 breath) -{ - ClientEnvEvent event; - event.type = CEE_PLAYER_BREATH; - event.player_breath.amount = breath; - m_client_event_queue.push(event); -} - /* Client likes to call these */ diff --git a/src/clientenvironment.h b/src/clientenvironment.h index 12070afec..606070e3a 100644 --- a/src/clientenvironment.h +++ b/src/clientenvironment.h @@ -42,8 +42,7 @@ class LocalPlayer; enum ClientEnvEventType { CEE_NONE, - CEE_PLAYER_DAMAGE, - CEE_PLAYER_BREATH + CEE_PLAYER_DAMAGE }; struct ClientEnvEvent @@ -56,9 +55,6 @@ struct ClientEnvEvent u8 amount; bool send_to_server; } player_damage; - struct{ - u16 amount; - } player_breath; }; }; @@ -113,7 +109,6 @@ public: */ void damageLocalPlayer(u8 damage, bool handle_hp=true); - void updateLocalPlayerBreath(u16 breath); /* Client likes to call these @@ -151,9 +146,6 @@ private: std::vector m_simple_objects; std::queue m_client_event_queue; IntervalLimiter m_active_object_light_update_interval; - IntervalLimiter m_lava_hurt_interval; - IntervalLimiter m_drowning_interval; - IntervalLimiter m_breathing_interval; std::list m_player_names; v3s16 m_camera_offset; };