aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content_cao.cpp6
-rw-r--r--src/content_sao.cpp5
-rw-r--r--src/localplayer.h2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index c5cb1e21a..d18a0233f 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -1585,7 +1585,13 @@ void GenericCAO::processMessage(const std::string &data)
}
if (m_is_local_player) {
LocalPlayer *player = m_env->getLocalPlayer();
+
player->makes_footstep_sound = m_prop.makes_footstep_sound;
+
+ aabb3f collisionbox = m_selection_box;
+ collisionbox.MinEdge += v3f(0, BS, 0);
+ collisionbox.MaxEdge += v3f(0, BS, 0);
+ player->setCollisionbox(collisionbox);
}
if ((m_is_player && !m_is_local_player) && m_prop.nametag == "")
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index d59f97276..20b0396cd 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -1429,7 +1429,10 @@ bool PlayerSAO::checkMovementCheat()
bool PlayerSAO::getCollisionBox(aabb3f *toset) const
{
- *toset = aabb3f(-BS * 0.30, 0.0, -BS * 0.30, BS * 0.30, BS * 1.75, BS * 0.30);
+ //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->MinEdge += m_base_position;
toset->MaxEdge += m_base_position;
return true;
diff --git a/src/localplayer.h b/src/localplayer.h
index 9cbefae23..efea8bb86 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -137,6 +137,8 @@ public:
v3f getEyePosition() const { return m_position + getEyeOffset(); }
v3f getEyeOffset() const;
+ void setCollisionbox(aabb3f box) { m_collisionbox = box; }
+
private:
void accelerateHorizontal(const v3f &target_speed, const f32 max_increase);
void accelerateVertical(const v3f &target_speed, const f32 max_increase);