mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Introduce DynamicTree, Separate Ray from CollisionRay (#951)
* separates Rays from CollisionRays, removing collision masking from Ray * Entity, ClientEntityManager and EntityManager classes occasionally need to UpdateEntityTree Entity intersection queries now use a DynamicTree DynamicTree now correctly reports Count and separately NodeCount DynamicTree now has optionally precise queries DynamicTree no longer incorrectly Adds on AddOrUpdate if Update is not necessary Entity startup now starts Transform, then Collidable, then remaining components EntityManger's Entity dictionary is now a ConcurrentDictionary to support iteration under modification DynamicTree freeing root leaf no longer results in invalid tree SnapGridComponent has been extended to support additional area and directional queries * added lots of calls to UpdateEntityTree, will need to scale back during review fixed moved/changed AABB updates to DynamicTree, missed a ref converted other methods in EntityManager to use the tree for spatial queries * add unit tests for DynamicTree make Capacity and EnsureCapacity public, setting Capacity will call EnsureCapacity * fix brace style * Box2 Grow -> Enlarged, Combine -> Union
This commit is contained in:
@@ -422,10 +422,20 @@ namespace Robust.Server.Maps
|
||||
|
||||
private void FinishEntitiesStartup()
|
||||
{
|
||||
foreach (var entity in Entities)
|
||||
{
|
||||
_serverEntityManager.UpdateEntityTree(entity);
|
||||
}
|
||||
|
||||
foreach (var entity in Entities)
|
||||
{
|
||||
_serverEntityManager.FinishEntityStartup(entity);
|
||||
}
|
||||
|
||||
foreach (var entity in Entities)
|
||||
{
|
||||
_serverEntityManager.UpdateEntityTree(entity);
|
||||
}
|
||||
}
|
||||
|
||||
// Serialization
|
||||
|
||||
Reference in New Issue
Block a user