#include "player.h"
#include <fstream>
-#include "jthread/jmutexautolock.h"
+#include "threading/mutex_auto_lock.h"
#include "util/numeric.h"
#include "hud.h"
#include "constants.h"
"listring[]"
"list[current_player;craftpreview;7,1;1,1;]";
- // Initialize movement settings at default values, so movement can work if the server fails to send them
+ // Initialize movement settings at default values, so movement can work
+ // if the server fails to send them
movement_acceleration_default = 3 * BS;
movement_acceleration_air = 2 * BS;
movement_acceleration_fast = 10 * BS;
physics_override_sneak = true;
physics_override_sneak_glitch = true;
- hud_flags = HUD_FLAG_HOTBAR_VISIBLE | HUD_FLAG_HEALTHBAR_VISIBLE |
- HUD_FLAG_CROSSHAIR_VISIBLE | HUD_FLAG_WIELDITEM_VISIBLE |
- HUD_FLAG_BREATHBAR_VISIBLE;
+ hud_flags =
+ HUD_FLAG_HOTBAR_VISIBLE | HUD_FLAG_HEALTHBAR_VISIBLE |
+ HUD_FLAG_CROSSHAIR_VISIBLE | HUD_FLAG_WIELDITEM_VISIBLE |
+ HUD_FLAG_BREATHBAR_VISIBLE | HUD_FLAG_MINIMAP_VISIBLE;
hud_hotbar_itemcount = HUD_HOTBAR_ITEMCOUNT_DEFAULT;
}
u32 Player::addHud(HudElement *toadd)
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
u32 id = getFreeHudID();
HudElement* Player::getHud(u32 id)
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
if (id < hud.size())
return hud[id];
HudElement* Player::removeHud(u32 id)
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
HudElement* retval = NULL;
if (id < hud.size()) {
void Player::clearHud()
{
- JMutexAutoLock lock(m_mutex);
+ MutexAutoLock lock(m_mutex);
while(!hud.empty()) {
delete hud.back();