aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 5bbbd154d..df5cae34f 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -784,7 +784,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
m_prop.hp_max = PLAYER_MAX_HP;
m_prop.physical = false;
m_prop.weight = 75;
- m_prop.collisionbox = aabb3f(-0.3f, -1.0f, -0.3f, 0.3f, 0.75f, 0.3f);
+ m_prop.collisionbox = aabb3f(-0.3f, 0.0f, -0.3f, 0.3f, 1.77f, 0.3f);
// start of default appearance, this should be overwritten by LUA
m_prop.visual = "upright_sprite";
m_prop.visual_size = v2f(1, 2);
@@ -856,7 +856,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
os << serializeString(m_player->getName()); // name
writeU8(os, 1); // is_player
writeS16(os, getId()); //id
- writeV3F1000(os, m_base_position + v3f(0,BS*1,0));
+ writeV3F1000(os, m_base_position);
writeF1000(os, m_yaw);
writeS16(os, getHP());
@@ -1009,7 +1009,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
if(isAttached()) // Just in case we ever do send attachment position too
pos = m_env->getActiveObject(m_attachment_parent_id)->getBasePosition();
else
- pos = m_base_position + v3f(0,BS*1,0);
+ pos = m_base_position;
std::string str = gob_cmd_update_position(
pos,
v3f(0,0,0),
@@ -1414,7 +1414,9 @@ bool PlayerSAO::checkMovementCheat()
bool PlayerSAO::getCollisionBox(aabb3f *toset) const
{
- *toset = aabb3f(-0.3f * BS, 0.0f, -0.3f * BS, 0.3f * BS, 1.75f * BS, 0.3f * BS);
+ //update collision box
+ toset->MinEdge = m_prop.collisionbox.MinEdge * BS;
+ toset->MaxEdge = m_prop.collisionbox.MaxEdge * BS;
toset->MinEdge += m_base_position;
toset->MaxEdge += m_base_position;