mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Damage: Remove damage ignore timer
This commit is contained in:
parent
d677f292cc
commit
03caa1e319
@ -264,14 +264,9 @@ void Client::connect(Address address, bool is_local_server)
|
||||
void Client::step(float dtime)
|
||||
{
|
||||
// Limit a bit
|
||||
if(dtime > 2.0)
|
||||
if (dtime > 2.0)
|
||||
dtime = 2.0;
|
||||
|
||||
if(m_ignore_damage_timer > dtime)
|
||||
m_ignore_damage_timer -= dtime;
|
||||
else
|
||||
m_ignore_damage_timer = 0.0;
|
||||
|
||||
m_animation_time += dtime;
|
||||
if(m_animation_time > 60.0)
|
||||
m_animation_time -= 60.0;
|
||||
@ -394,7 +389,6 @@ void Client::step(float dtime)
|
||||
ClientEnvEvent envEvent = m_env.getClientEnvEvent();
|
||||
|
||||
if (envEvent.type == CEE_PLAYER_DAMAGE) {
|
||||
if (m_ignore_damage_timer <= 0) {
|
||||
u8 damage = envEvent.player_damage.amount;
|
||||
|
||||
if (envEvent.player_damage.send_to_server)
|
||||
@ -407,7 +401,6 @@ void Client::step(float dtime)
|
||||
m_client_event_queue.push(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Print some info
|
||||
|
@ -469,7 +469,6 @@ private:
|
||||
float m_connection_reinit_timer = 0.1f;
|
||||
float m_avg_rtt_timer = 0.0f;
|
||||
float m_playerpos_send_timer = 0.0f;
|
||||
float m_ignore_damage_timer = 0.0f; // Used after server moves player
|
||||
IntervalLimiter m_map_timer_and_unload_interval;
|
||||
|
||||
IWritableTextureSource *m_tsrc;
|
||||
|
@ -573,10 +573,6 @@ void Client::handleCommand_MovePlayer(NetworkPacket* pkt)
|
||||
event->player_force_move.pitch = pitch;
|
||||
event->player_force_move.yaw = yaw;
|
||||
m_client_event_queue.push(event);
|
||||
|
||||
// Ignore damage for a few seconds, so that the player doesn't
|
||||
// get damage from falling on ground
|
||||
m_ignore_damage_timer = 3.0;
|
||||
}
|
||||
|
||||
void Client::handleCommand_DeathScreen(NetworkPacket* pkt)
|
||||
|
Loading…
Reference in New Issue
Block a user