diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-10 15:23:36 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-10 15:23:36 +0300 |
commit | 1a32e5585f542a400c48e6befbbb0aade631e506 (patch) | |
tree | 31ad40f2284152d73ffac2414512c88e79ff7c4f /src | |
parent | 5a4d8ffad3b172eae67844deda6b65273b7c9757 (diff) | |
download | minetest-1a32e5585f542a400c48e6befbbb0aade631e506.tar.gz minetest-1a32e5585f542a400c48e6befbbb0aade631e506.tar.bz2 minetest-1a32e5585f542a400c48e6befbbb0aade631e506.zip |
fixed a bit
Diffstat (limited to 'src')
-rw-r--r-- | src/environment.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index edccad1ce..435690bca 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -626,16 +626,21 @@ void ServerEnvironment::step(float dtime) { block->m_static_objects.insert(0, s_obj); block->setChangedFlag(); + obj->m_static_exists = true; + obj->m_static_block = block->getPos(); } // If not possible, add back to previous block else if(oldblock) { oldblock->m_static_objects.insert(0, s_obj); oldblock->setChangedFlag(); + obj->m_static_exists = true; + obj->m_static_block = oldblock->getPos(); } else{ dstream<<"WARNING: Server: Could not find a block for " <<"storing static object"<<std::endl; + obj->m_static_exists = false; continue; } // Delete active object @@ -777,6 +782,8 @@ u16 ServerEnvironment::addActiveObject(ServerActiveObject *object) if(block) { block->m_static_objects.m_active.insert(object->getId(), s_obj); + object->m_static_exists = true; + object->m_static_block = blockpos; } else{ dstream<<"WARNING: Server: Could not find a block for " |