Drop ClientEvent CEE_PLAYER_BREATH: triggering function is not called.

Also drop 3 useless IntervalLimiter
This commit is contained in:
Loic Blot 2018-07-01 13:47:50 +02:00
parent 49509d2f74
commit 1ff15d3a46
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
2 changed files with 2 additions and 21 deletions

@ -203,10 +203,7 @@ void ClientEnvironment::step(float dtime)
lplayer->move(dtime_part, this, position_max_increment, lplayer->move(dtime_part, this, position_max_increment,
&player_collisions); &player_collisions);
} }
} } while (dtime_downcount > 0.001);
while(dtime_downcount > 0.001);
//std::cout<<"Looped "<<loopcount<<" times."<<std::endl;
bool player_immortal = lplayer->getCAO() && lplayer->getCAO()->isImmortal(); 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); 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 Client likes to call these
*/ */

@ -42,8 +42,7 @@ class LocalPlayer;
enum ClientEnvEventType enum ClientEnvEventType
{ {
CEE_NONE, CEE_NONE,
CEE_PLAYER_DAMAGE, CEE_PLAYER_DAMAGE
CEE_PLAYER_BREATH
}; };
struct ClientEnvEvent struct ClientEnvEvent
@ -56,9 +55,6 @@ struct ClientEnvEvent
u8 amount; u8 amount;
bool send_to_server; bool send_to_server;
} player_damage; } player_damage;
struct{
u16 amount;
} player_breath;
}; };
}; };
@ -113,7 +109,6 @@ public:
*/ */
void damageLocalPlayer(u8 damage, bool handle_hp=true); void damageLocalPlayer(u8 damage, bool handle_hp=true);
void updateLocalPlayerBreath(u16 breath);
/* /*
Client likes to call these Client likes to call these
@ -151,9 +146,6 @@ private:
std::vector<ClientSimpleObject*> m_simple_objects; std::vector<ClientSimpleObject*> m_simple_objects;
std::queue<ClientEnvEvent> m_client_event_queue; std::queue<ClientEnvEvent> m_client_event_queue;
IntervalLimiter m_active_object_light_update_interval; IntervalLimiter m_active_object_light_update_interval;
IntervalLimiter m_lava_hurt_interval;
IntervalLimiter m_drowning_interval;
IntervalLimiter m_breathing_interval;
std::list<std::string> m_player_names; std::list<std::string> m_player_names;
v3s16 m_camera_offset; v3s16 m_camera_offset;
}; };