summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/lua_api.txt3
-rw-r--r--src/content_sao.cpp1
-rw-r--r--src/object_properties.cpp5
-rw-r--r--src/object_properties.h1
-rw-r--r--src/script/common/c_content.cpp4
5 files changed, 2 insertions, 12 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index b06e08548..551aa50b5 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -6148,9 +6148,6 @@ Player properties need to be saved manually.
collide_with_objects = true,
-- Collide with other objects if physical = true
- weight = 5,
- -- Unused.
-
collisionbox = {-0.5, 0.0, -0.5, 0.5, 1.0, 0.5}, -- Default
selectionbox = {-0.5, 0.0, -0.5, 0.5, 1.0, 0.5},
-- Selection box uses collision box dimensions when not set.
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index ebda0efc9..43c784b42 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -869,7 +869,6 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t p
m_prop.hp_max = PLAYER_MAX_HP_DEFAULT;
m_prop.breath_max = PLAYER_MAX_BREATH_DEFAULT;
m_prop.physical = false;
- m_prop.weight = 75;
m_prop.collisionbox = aabb3f(-0.3f, 0.0f, -0.3f, 0.3f, 1.77f, 0.3f);
m_prop.selectionbox = aabb3f(-0.3f, 0.0f, -0.3f, 0.3f, 1.77f, 0.3f);
m_prop.pointable = true;
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index a037c5f65..4cf180b18 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -37,7 +37,6 @@ std::string ObjectProperties::dump()
os << ", breath_max=" << breath_max;
os << ", physical=" << physical;
os << ", collideWithObjects=" << collideWithObjects;
- os << ", weight=" << weight;
os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," << PP(collisionbox.MaxEdge);
os << ", visual=" << visual;
os << ", mesh=" << mesh;
@@ -77,7 +76,7 @@ void ObjectProperties::serialize(std::ostream &os) const
writeU8(os, 4); // PROTOCOL_VERSION >= 37
writeU16(os, hp_max);
writeU8(os, physical);
- writeF32(os, weight);
+ writeF32(os, 0.f); // Removed property (weight)
writeV3F32(os, collisionbox.MinEdge);
writeV3F32(os, collisionbox.MaxEdge);
writeV3F32(os, selectionbox.MinEdge);
@@ -128,7 +127,7 @@ void ObjectProperties::deSerialize(std::istream &is)
hp_max = readU16(is);
physical = readU8(is);
- weight = readF32(is);
+ readU32(is); // removed property (weight)
collisionbox.MinEdge = readV3F32(is);
collisionbox.MaxEdge = readV3F32(is);
selectionbox.MinEdge = readV3F32(is);
diff --git a/src/object_properties.h b/src/object_properties.h
index 199182d70..3895f3379 100644
--- a/src/object_properties.h
+++ b/src/object_properties.h
@@ -31,7 +31,6 @@ struct ObjectProperties
u16 breath_max = 0;
bool physical = false;
bool collideWithObjects = true;
- float weight = 5.0f;
// Values are BS=1
aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
aabb3f selectionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index fc1d82bcc..ca061c454 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -208,8 +208,6 @@ void read_object_properties(lua_State *L, int index,
getboolfield(L, -1, "physical", prop->physical);
getboolfield(L, -1, "collide_with_objects", prop->collideWithObjects);
- getfloatfield(L, -1, "weight", prop->weight);
-
lua_getfield(L, -1, "collisionbox");
bool collisionbox_defined = lua_istable(L, -1);
if (collisionbox_defined)
@@ -340,8 +338,6 @@ void push_object_properties(lua_State *L, ObjectProperties *prop)
lua_setfield(L, -2, "physical");
lua_pushboolean(L, prop->collideWithObjects);
lua_setfield(L, -2, "collide_with_objects");
- lua_pushnumber(L, prop->weight);
- lua_setfield(L, -2, "weight");
push_aabb3f(L, prop->collisionbox);
lua_setfield(L, -2, "collisionbox");
push_aabb3f(L, prop->selectionbox);