summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-06-28 14:06:34 +0000
committerPilzAdam <pilzadam@minetest.net>2013-06-28 14:15:48 +0000
commit280946ba836cde9516f9344f47561f3356bdf869 (patch)
treefb238ce650df6cf6df0545b90f4ebe2859fcbe41 /src/player.cpp
parent9e100bc42b5275299020ea8619e64f2e4aa76192 (diff)
downloadminetest-280946ba836cde9516f9344f47561f3356bdf869.tar.gz
minetest-280946ba836cde9516f9344f47561f3356bdf869.tar.bz2
minetest-280946ba836cde9516f9344f47561f3356bdf869.zip
Dont write player files all the time
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/player.cpp b/src/player.cpp
index ec1e3aff7..2a7a3084c 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -44,7 +44,12 @@ Player::Player(IGameDef *gamedef):
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.55,BS*0.30)
+ m_collisionbox(-BS*0.30,0.0,-BS*0.30,BS*0.30,BS*1.55,BS*0.30),
+ m_last_pitch(0),
+ m_last_yaw(0),
+ m_last_pos(0,0,0),
+ m_last_hp(PLAYER_MAX_HP),
+ m_last_inventory(gamedef->idef())
{
updateName("<not set>");
inventory.clear();
@@ -53,6 +58,7 @@ Player::Player(IGameDef *gamedef):
craft->setWidth(3);
inventory.addList("craftpreview", 1);
inventory.addList("craftresult", 1);
+ m_last_inventory = inventory;
// Can be redefined via Lua
inventory_formspec = "size[8,7.5]"
@@ -224,6 +230,9 @@ void Player::deSerialize(std::istream &is, std::string playername)
inventory.getList("craftresult")->changeItem(0, ItemStack());
}
}
+
+ // Set m_last_*
+ checkModified();
}
/*