fix: Cleanup IPoint3D calls (#704)
This commit is contained in:
parent
788b04b958
commit
3293ffcf06
33 changed files with 158 additions and 264 deletions
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Server.Collections;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
|
|
@ -141,11 +141,15 @@ namespace Server
|
|||
{
|
||||
if (m_Mobiles != null)
|
||||
{
|
||||
var sandbox = new List<Mobile>(m_Mobiles);
|
||||
|
||||
foreach (var mob in sandbox)
|
||||
using var queue = PooledRefQueue<Mobile>.Create(m_Mobiles.Count);
|
||||
foreach (var mob in m_Mobiles)
|
||||
{
|
||||
mob.UpdateRegion();
|
||||
queue.Enqueue(mob);
|
||||
}
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
queue.Dequeue().UpdateRegion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -162,7 +166,7 @@ namespace Server
|
|||
|
||||
public void Activate()
|
||||
{
|
||||
if (!Active && Owner != Map.Internal)
|
||||
if (!Active)
|
||||
{
|
||||
if (m_Items != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue