summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 2a2384b3d..f0004da01 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -59,7 +59,7 @@ public:
m_age += dtime;
if(m_age > 10)
{
- m_removed = true;
+ m_pending_removal = true;
return;
}
@@ -397,12 +397,11 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
{
ServerMap *map = dynamic_cast<ServerMap *>(&m_env->getMap());
assert(map);
- if (!m_pending_deactivation &&
+ if (!m_pending_removal &&
map->saoPositionOverLimit(m_base_position)) {
- infostream << "Remove SAO " << m_id << "(" << m_init_name
+ infostream << "Removing SAO " << m_id << "(" << m_init_name
<< "), outside of limits" << std::endl;
- m_pending_deactivation = true;
- m_removed = true;
+ m_pending_removal = true;
return;
}
}
@@ -550,9 +549,9 @@ int LuaEntitySAO::punch(v3f dir,
ServerActiveObject *puncher,
float time_from_last_punch)
{
- if (!m_registered){
+ if (!m_registered) {
// Delete unknown LuaEntities when punched
- m_removed = true;
+ m_pending_removal = true;
return 0;
}
@@ -596,12 +595,10 @@ int LuaEntitySAO::punch(v3f dir,
}
if (getHP() == 0) {
- m_removed = true;
+ m_pending_removal = true;
m_env->getScriptIface()->luaentity_on_death(m_id, puncher);
}
-
-
return result.wear;
}
@@ -1353,11 +1350,10 @@ void PlayerSAO::setWieldIndex(int i)
}
}
-// Erase the peer id and make the object for removal
void PlayerSAO::disconnected()
{
m_peer_id = 0;
- m_removed = true;
+ m_pending_removal = true;
}
void PlayerSAO::unlinkPlayerSessionAndSave()