lua_bindings/mesh: Trigger Urho3D Octree update by using cg->SetZoneMask(magic::DEFAULT_ZONEMASK)

This commit is contained in:
Perttu Ahola 2014-10-27 00:50:33 +02:00
parent 4937a83ac5
commit 8c864c6ac9
2 changed files with 4 additions and 8 deletions

View File

@ -69,11 +69,3 @@ Buildat TODO
- Make some kind of an ace of spades clone (or less of a clone); something that - Make some kind of an ace of spades clone (or less of a clone); something that
requires the game to control the creation and deletion of the world anyway, requires the game to control the creation and deletion of the world anyway,
and implement the required interfaces and implement the required interfaces
- There is some kind of a bug in node visibility checking which can be caused by
building long pillars. Parts of the pillars will be invisible depending on
where the camera is located. The situation will fix itself when a new client
is started to the same scene.
- This affects physics in some way too, in such a way that when building a
pillar and you start getting invisible nodes, after a few of them you
can't jump anymore - but you can still climb them from the side, and build
on them

View File

@ -181,6 +181,8 @@ struct SetVoxelGeometryTask: public interface::thread_pool::Task
cg, context, temp_geoms, atlas_reg.get()); cg, context, temp_geoms, atlas_reg.get());
cg->SetOccluder(true); cg->SetOccluder(true);
cg->SetCastShadows(true); cg->SetCastShadows(true);
// Octree update: Trigger CustomGeometry::OnWorldBoundingBoxUpdate()
cg->SetZoneMask(magic::DEFAULT_ZONEMASK);
return true; return true;
} }
}; };
@ -237,6 +239,8 @@ struct SetVoxelLodGeometryTask: public interface::thread_pool::Task
cg->SetCastShadows(true); cg->SetCastShadows(true);
else else
cg->SetCastShadows(false); cg->SetCastShadows(false);
// Octree update: Trigger CustomGeometry::OnWorldBoundingBoxUpdate()
cg->SetZoneMask(magic::DEFAULT_ZONEMASK);
return true; return true;
} }
}; };