private static void UpdateData(TreeManager tm, SimulationManager.UpdateMode mode)
		{
			Singleton<LoadingManager>.instance.m_loadingProfilerSimulation.BeginLoading("TreeManager.UpdateData");
            if (TreeUnlimiter.Mod.DEBUG_LOG_ON == true) { Debug.Log("[TreeUnlimiter::LimitTreeManager::UpdateData()] calling Ensure Init"); }
            LimitTreeManager.Helper.EnsureInit(3);
			for (int i = 1; i < LimitTreeManager.Helper.TreeLimit; i++)
			{
				if (tm.m_trees.m_buffer[i].m_flags != 0 && tm.m_trees.m_buffer[i].Info == null)
				{
					tm.ReleaseTree((uint)i);
				}
			}
			int num = PrefabCollection<TreeInfo>.PrefabCount();
			int num1 = 1;
			while (num1 * num1 < num)
			{
				num1++;
			}
			for (int j = 0; j < num; j++)
			{
				TreeInfo prefab = PrefabCollection<TreeInfo>.GetPrefab((uint)j);
				if (prefab != null)
				{
					prefab.SetRenderParameters(j, num1);
				}
			}
			ColossalFramework.Threading.ThreadHelper.dispatcher.Dispatch(() => {
				tm.GetType().GetField("m_lastShadowRotation", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(tm, new Quaternion());
				tm.GetType().GetField("m_lastCameraRotation", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(tm, new Quaternion());
			});
			tm.m_infoCount = num;
			Singleton<LoadingManager>.instance.m_loadingProfilerSimulation.EndLoading();
		}