projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e67fa3
)
Delete unknown LuaEntities when punched
author
Perttu Ahola
<celeron55@gmail.com>
Sun, 4 Dec 2011 14:25:27 +0000
(16:25 +0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Sun, 4 Dec 2011 14:25:27 +0000
(16:25 +0200)
src/content_sao.cpp
patch
|
blob
|
history
diff --git
a/src/content_sao.cpp
b/src/content_sao.cpp
index 770577c568182fb9cfe1665a1a74951f1674c77a..afe82bdd2c9bd94e8f65a2ba1dcb39215ae0c7d7 100644
(file)
--- a/
src/content_sao.cpp
+++ b/
src/content_sao.cpp
@@
-1658,8
+1658,11
@@
std::string LuaEntitySAO::getStaticData()
void LuaEntitySAO::punch(ServerActiveObject *puncher, float time_from_last_punch)
{
- if(!m_registered)
+ if(!m_registered){
+ // Delete unknown LuaEntities when punched
+ m_removed = true;
return;
+ }
lua_State *L = m_env->getLua();
scriptapi_luaentity_punch(L, m_id, puncher, time_from_last_punch);
}