fix(physics): activate collision generations atomically
This commit is contained in:
parent
3e0f3b6206
commit
be94bc9b06
18 changed files with 1402 additions and 80 deletions
|
|
@ -32,6 +32,7 @@ public sealed class StreamingController
|
|||
public bool GenerationAdvanced;
|
||||
public bool PendingLoadsCleared;
|
||||
public bool CompletionQueueCleared;
|
||||
public bool PendingPublicationsCleared;
|
||||
public bool RegionCleared;
|
||||
public bool SpatialGenerationDetached;
|
||||
public bool PreparationCommitted;
|
||||
|
|
@ -45,6 +46,7 @@ public sealed class StreamingController
|
|||
public bool GenerationAdvanced;
|
||||
public bool PendingLoadsCleared;
|
||||
public bool CompletionQueueCleared;
|
||||
public bool PendingPublicationsCleared;
|
||||
public bool RegionCleared;
|
||||
public List<uint>? ResidentIds;
|
||||
public IEnumerator<uint>? ResidentEnumerator;
|
||||
|
|
@ -1358,6 +1360,22 @@ public sealed class StreamingController
|
|||
}
|
||||
if (!transaction.RegionCleared)
|
||||
{
|
||||
if (!transaction.PendingPublicationsCleared)
|
||||
{
|
||||
if (!TryRunStreamingWork(
|
||||
meter,
|
||||
new StreamingWorkCost(EntityOperations: 1),
|
||||
"recenter-cancel-publications",
|
||||
() =>
|
||||
{
|
||||
_presentation.CancelPendingPublications();
|
||||
transaction.PendingPublicationsCleared = true;
|
||||
return true;
|
||||
}))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!TryRunStreamingWork(
|
||||
meter,
|
||||
new StreamingWorkCost(EntityOperations: 1),
|
||||
|
|
@ -1499,6 +1517,22 @@ public sealed class StreamingController
|
|||
|
||||
if (!transaction.RegionCleared)
|
||||
{
|
||||
if (!transaction.PendingPublicationsCleared)
|
||||
{
|
||||
if (!TryRunStreamingWork(
|
||||
meter,
|
||||
new StreamingWorkCost(EntityOperations: 1),
|
||||
"reload-cancel-publications",
|
||||
() =>
|
||||
{
|
||||
_presentation.CancelPendingPublications();
|
||||
transaction.PendingPublicationsCleared = true;
|
||||
return true;
|
||||
}))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!TryRunStreamingWork(
|
||||
meter,
|
||||
new StreamingWorkCost(EntityOperations: 1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue