summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2017-05-09 01:59:02 +0100
committerparamat <mat.gregory@virginmedia.com>2017-05-09 03:52:28 +0100
commitda88a186766020762f5c86bc6ba1624e4feaae2c (patch)
treef8abbc09c17f951da1e768a963e9b0a68d7d8611 /src/content_sao.cpp
parentc07c642ab091b7250ecdc5defee1fec26ba73dc4 (diff)
downloadminetest-da88a186766020762f5c86bc6ba1624e4feaae2c.tar.gz
minetest-da88a186766020762f5c86bc6ba1624e4feaae2c.tar.bz2
minetest-da88a186766020762f5c86bc6ba1624e4feaae2c.zip
Revert custom player collision box and step height commits
These caused inability to pass through 2 node high spaces or step up onto slabs or steps when a new client connected to an older server.
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index f1a4df056..f435fe938 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -797,7 +797,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
m_prop.hp_max = PLAYER_MAX_HP;
m_prop.physical = false;
- m_prop.weight = PLAYER_DEFAULT_WEIGHT;
+ m_prop.weight = 75;
m_prop.collisionbox = aabb3f(-0.3f, -1.0f, -0.3f, 0.3f, 0.75f, 0.3f);
// start of default appearance, this should be overwritten by LUA
m_prop.visual = "upright_sprite";
@@ -811,7 +811,6 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
// end of default appearance
m_prop.is_visible = true;
m_prop.makes_footstep_sound = true;
- m_prop.stepheight = PLAYER_DEFAULT_STEPHEIGHT;
m_hp = PLAYER_MAX_HP;
}
@@ -1429,9 +1428,7 @@ bool PlayerSAO::checkMovementCheat()
bool PlayerSAO::getCollisionBox(aabb3f *toset) const
{
- //update collision box
- toset->MinEdge = m_prop.collisionbox.MinEdge * BS + v3f(0, BS, 0);
- toset->MaxEdge = m_prop.collisionbox.MaxEdge * BS + v3f(0, BS, 0);
+ *toset = aabb3f(-0.3f * BS, 0.0f, -0.3f * BS, 0.3f * BS, 1.75f * BS, 0.3f * BS);
toset->MinEdge += m_base_position;
toset->MaxEdge += m_base_position;