aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorTeTpaAka <TeTpaAka@users.noreply.github.com>2015-05-29 20:30:55 +0200
committerShadowNinja <shadowninja@minetest.net>2017-05-06 15:41:05 -0400
commitb6f4a9c7e1a4f0bac66fd6f6ff844425ac775975 (patch)
tree228bef3edfcb05091b8a08184734ae6ff2244193 /src/content_sao.cpp
parent43d1f375d18a2fbc547a9b4f23d1354d645856ca (diff)
downloadminetest-b6f4a9c7e1a4f0bac66fd6f6ff844425ac775975.tar.gz
minetest-b6f4a9c7e1a4f0bac66fd6f6ff844425ac775975.tar.bz2
minetest-b6f4a9c7e1a4f0bac66fd6f6ff844425ac775975.zip
Make the player collisionbox settable
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp5
1 files changed, 4 insertions, 1 deletions
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;