private void CheckVisualOrPathCostChange(IntVec3 c, float oldDepth, float newDepth) { if (!Mathf.Approximately(oldDepth, newDepth)) { if (Mathf.Abs(oldDepth - newDepth) > 0.15f || Rand.Value < 0.0125f) { this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)TyranidHiveUtility.MapMeshFlag.Hive, true, false); this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)TyranidHiveUtility.MapMeshFlag.Hive, true, false); } else if (newDepth == 0f) { this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)TyranidHiveUtility.MapMeshFlag.Hive, true, false); } if (TyranidHiveUtility.GetSnowCategory(oldDepth) != TyranidHiveUtility.GetSnowCategory(newDepth)) { this.map.pathGrid.RecalculatePerceivedPathCostAt(c); } } }
public TyranidHiveUtility.HiveCategory GetCategory(IntVec3 c) { return(TyranidHiveUtility.GetSnowCategory(this.GetDepth(c))); }