lplayer->move(dtime_part, this, position_max_increment,
&player_collisions);
}
- }
- while(dtime_downcount > 0.001);
-
- //std::cout<<"Looped "<<loopcount<<" times."<<std::endl;
+ } while (dtime_downcount > 0.001);
bool player_immortal = lplayer->getCAO() && lplayer->getCAO()->isImmortal();
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
*/
enum ClientEnvEventType
{
CEE_NONE,
- CEE_PLAYER_DAMAGE,
- CEE_PLAYER_BREATH
+ CEE_PLAYER_DAMAGE
};
struct ClientEnvEvent
u8 amount;
bool send_to_server;
} player_damage;
- struct{
- u16 amount;
- } player_breath;
};
};
*/
void damageLocalPlayer(u8 damage, bool handle_hp=true);
- void updateLocalPlayerBreath(u16 breath);
/*
Client likes to call these
std::vector<ClientSimpleObject*> m_simple_objects;
std::queue<ClientEnvEvent> 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<std::string> m_player_names;
v3s16 m_camera_offset;
};