mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 23:05:07 -05:00
fixed a bit
This commit is contained in:
parent
5a4d8ffad3
commit
1a32e5585f
@ -626,16 +626,21 @@ void ServerEnvironment::step(float dtime)
|
|||||||
{
|
{
|
||||||
block->m_static_objects.insert(0, s_obj);
|
block->m_static_objects.insert(0, s_obj);
|
||||||
block->setChangedFlag();
|
block->setChangedFlag();
|
||||||
|
obj->m_static_exists = true;
|
||||||
|
obj->m_static_block = block->getPos();
|
||||||
}
|
}
|
||||||
// If not possible, add back to previous block
|
// If not possible, add back to previous block
|
||||||
else if(oldblock)
|
else if(oldblock)
|
||||||
{
|
{
|
||||||
oldblock->m_static_objects.insert(0, s_obj);
|
oldblock->m_static_objects.insert(0, s_obj);
|
||||||
oldblock->setChangedFlag();
|
oldblock->setChangedFlag();
|
||||||
|
obj->m_static_exists = true;
|
||||||
|
obj->m_static_block = oldblock->getPos();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
dstream<<"WARNING: Server: Could not find a block for "
|
dstream<<"WARNING: Server: Could not find a block for "
|
||||||
<<"storing static object"<<std::endl;
|
<<"storing static object"<<std::endl;
|
||||||
|
obj->m_static_exists = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Delete active object
|
// Delete active object
|
||||||
@ -777,6 +782,8 @@ u16 ServerEnvironment::addActiveObject(ServerActiveObject *object)
|
|||||||
if(block)
|
if(block)
|
||||||
{
|
{
|
||||||
block->m_static_objects.m_active.insert(object->getId(), s_obj);
|
block->m_static_objects.m_active.insert(object->getId(), s_obj);
|
||||||
|
object->m_static_exists = true;
|
||||||
|
object->m_static_block = blockpos;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
dstream<<"WARNING: Server: Could not find a block for "
|
dstream<<"WARNING: Server: Could not find a block for "
|
||||||
|
Loading…
Reference in New Issue
Block a user