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); } } }
// Token: 0x0600268A RID: 9866 RVA: 0x00124ABC File Offset: 0x00122EBC public static void Notify_HiveLikeDespawned(HiveLike hivelike, Map map) { int num = GenRadial.NumCellsInRadius(2f); for (int i = 0; i < num; i++) { IntVec3 c = hivelike.Position + GenRadial.RadialPattern[i]; if (c.InBounds(map)) { List <Thing> thingList = c.GetThingList(map); for (int j = 0; j < thingList.Count; j++) { if (thingList[j].Faction == hivelike.OfFaction && !TyranidHiveUtility.AnyHiveLikePreventsClaiming(thingList[j])) { thingList[j].SetFaction(null, null); } } } } }
public TyranidHiveUtility.HiveCategory GetCategory(IntVec3 c) { return(TyranidHiveUtility.GetSnowCategory(this.GetDepth(c))); }