private void Update() { if (LocalPlayer.Transform) { float num = this.CalcCellLodRatio(this.WorldToGridX(LocalPlayer.Transform.position.x), this.WorldToGridY(LocalPlayer.Transform.position.z)); this.TreeDensityUnscaled = 1f - (num - this._minOutput) / this._maxOutput; if (this._updateTreeOcclusionBonusRatio) { TheForestQualitySettings.DrawDistances drawDistance = TheForestQualitySettings.UserSettings.DrawDistance; if (drawDistance != TheForestQualitySettings.DrawDistances.Medium) { if (drawDistance != TheForestQualitySettings.DrawDistances.Low) { if (drawDistance == TheForestQualitySettings.DrawDistances.UltraLow) { num -= (num - this._minOutput) * 0.6f; } } else { num -= (num - this._minOutput) * 0.4f; } } else { num -= (num - this._minOutput) * 0.2f; } LOD_Manager.TreeOcclusionBonusRatio = Mathf.Lerp(LOD_Manager.TreeOcclusionBonusRatio, num, (LOD_Manager.TreeOcclusionBonusRatio >= num) ? 0.03f : 0.012f); } } else { LOD_Manager.TreeOcclusionBonusRatio = 1f; } }
private void Awake() { this.maxDrawDistanceSetting = this.LodSettings.GetNewObjectMaxDrawDistance; }
private void Awake() { this.maxDrawDistanceSetting = this.LodSettings.GetNewObjectMaxDrawDistance; }