public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (!Sandstorm.HasSufficientWind()) { Sandstorm.TimeLeft -= 15 * Main.dayRate; } if ((double)Main.windSpeedCurrent == 0.0) { Sandstorm.TimeLeft = 0; } if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else if (Sandstorm.HasSufficientWind()) { for (int index = 0; index < Main.dayRate; ++index) { if (Main.rand.Next(86400) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }
public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else { var num = (int)((double)Main.windSpeed * 100.0); for (var index = 0; index < Main.dayRate; ++index) { if (Main.rand.Next(777600) == 0) { Sandstorm.StartSandstorm(); } else if ((Main.numClouds < 40 || Math.Abs(num) > 50) && Main.rand.Next(518400) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }
public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else { int value = (int)(Main.windSpeed * 100f); for (int i = 0; i < Main.dayRate; i++) { if (Main.rand.Next(518400) == 0) { Sandstorm.StartSandstorm(); } else if ((Main.numClouds < 40 || Math.Abs(value) > 50) && Main.rand.Next(345600) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }