// Token: 0x060022E7 RID: 8935 RVA: 0x001963F4 File Offset: 0x001945F4 private void QueueGraphUpdatesInternal() { bool flag = false; while (this.graphUpdateQueue.Count > 0) { GraphUpdateObject graphUpdateObject = this.graphUpdateQueue.Dequeue(); if (graphUpdateObject.requiresFloodFill) { flag = true; } foreach (object obj in this.astar.data.GetUpdateableGraphs()) { IUpdatableGraph updatableGraph = (IUpdatableGraph)obj; NavGraph graph = updatableGraph as NavGraph; if (graphUpdateObject.nnConstraint == null || graphUpdateObject.nnConstraint.SuitableGraph(this.astar.data.GetGraphIndex(graph), graph)) { GraphUpdateProcessor.GUOSingle item = default(GraphUpdateProcessor.GUOSingle); item.order = GraphUpdateProcessor.GraphUpdateOrder.GraphUpdate; item.obj = graphUpdateObject; item.graph = updatableGraph; this.graphUpdateQueueRegular.Enqueue(item); } } } if (flag) { GraphUpdateProcessor.GUOSingle item2 = default(GraphUpdateProcessor.GUOSingle); item2.order = GraphUpdateProcessor.GraphUpdateOrder.FloodFill; this.graphUpdateQueueRegular.Enqueue(item2); } GraphModifier.TriggerEvent(GraphModifier.EventType.PreUpdate); this.anyGraphUpdateInProgress = true; }
private void QueueGraphUpdatesInternal() { bool flag = false; while (this.graphUpdateQueue.Count > 0) { GraphUpdateObject graphUpdateObject = this.graphUpdateQueue.Dequeue(); if (graphUpdateObject.requiresFloodFill) { flag = true; } IEnumerator enumerator = this.astar.astarData.GetUpdateableGraphs().GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; IUpdatableGraph updatableGraph = (IUpdatableGraph)obj; NavGraph graph = updatableGraph as NavGraph; if (graphUpdateObject.nnConstraint == null || graphUpdateObject.nnConstraint.SuitableGraph(this.astar.astarData.GetGraphIndex(graph), graph)) { GraphUpdateProcessor.GUOSingle item = default(GraphUpdateProcessor.GUOSingle); item.order = GraphUpdateProcessor.GraphUpdateOrder.GraphUpdate; item.obj = graphUpdateObject; item.graph = updatableGraph; this.graphUpdateQueueRegular.Enqueue(item); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } } if (flag) { GraphUpdateProcessor.GUOSingle item2 = default(GraphUpdateProcessor.GUOSingle); item2.order = GraphUpdateProcessor.GraphUpdateOrder.FloodFill; this.graphUpdateQueueRegular.Enqueue(item2); } GraphModifier.TriggerEvent(GraphModifier.EventType.PreUpdate); this.anyGraphUpdateInProgress = true; }