Optimize updateFastFaceRow processing by removing some TileSpec copy (#5678)
[oweals/minetest.git] / src / player.cpp
index fa82a79f43b70cc60cde80eac33bb27a78c2ee53..85bc639ec17970b2f05f998795a021ed6663211e 100644 (file)
@@ -30,23 +30,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 
 Player::Player(const char *name, IItemDefManager *idef):
-       camera_barely_in_ceiling(false),
        inventory(idef),
-       hp(PLAYER_MAX_HP),
        peer_id(PEER_ID_INEXISTENT),
        keyPressed(0),
 // protected
-       m_breath(PLAYER_MAX_BREATH),
-       m_pitch(0),
-       m_yaw(0),
-       m_speed(0,0,0),
-       m_position(0,0,0),
-       m_collisionbox(-BS*0.30,0.0,-BS*0.30,BS*0.30,BS*1.75,BS*0.30)
+       m_speed(0,0,0)
 {
        strlcpy(m_name, name, PLAYERNAME_SIZE);
 
        inventory.clear();
        inventory.addList("main", PLAYER_INVENTORY_SIZE);
+       inventory.addList("hand", 1);
        InventoryList *craft = inventory.addList("craft", 9);
        craft->setWidth(3);
        inventory.addList("craftpreview", 1);
@@ -90,11 +84,6 @@ Player::~Player()
        clearHud();
 }
 
-v3s16 Player::getLightPosition() const
-{
-       return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
-}
-
 u32 Player::addHud(HudElement *toadd)
 {
        MutexAutoLock lock(m_mutex);