/// <summary> /// Removes a given WorldObject from the region it belongs to /// </summary> /// <param name="b"></param> public static void RemoveObject(WorldObjectBase b) { if (b == null) { return; } lock (currentRegions) { RegionBase ba = GetRegion(b.worldX, b.worldY); if (ba != null && ba.GetWorldObjects().Contains(b)) { ba.GetWorldObjects().Remove(b); } } }