Fix LS not flooding map when round continues again on same map

This commit is contained in:
UnknownShadow200 2018-07-20 05:49:24 +10:00
parent fd7c23e1a3
commit 1ca725b47f
2 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,9 @@ namespace MCGalaxy.Games {
RoundInProgress = true;
Logger.Log(LogType.GameActivity, "[Lava Survival] Round started. Map: " + Map.ColoredName);
Map.SetPhysics(destroyMode ? 2 : 1);
int secs = 0, layerSecs = 0;
while (RoundInProgress && secs < roundTotalSecs) {
if (!Running) return;
if ((secs % 60) == 0 && !flooded) { Map.Message(FloodTimeLeftMessage()); }
@ -96,8 +98,6 @@ namespace MCGalaxy.Games {
protected override bool SetMap(string map) {
if (!base.SetMap(map)) return false;
Map.SetPhysics(destroyMode ? 2 : 1);
Map.Config.PhysicsOverload = 1000000;
return true;
}

View File

@ -72,6 +72,8 @@ namespace MCGalaxy.Games {
roundTotalSecs = (int)cfg.RoundTime.TotalSeconds;
floodDelaySecs = (int)cfg.FloodTime.TotalSeconds;
layerIntervalSecs = (int)cfg.LayerInterval.TotalSeconds;
if (RoundInProgress) Map.SetPhysics(destroyMode ? 2 : 1);
}
protected override List<Player> GetPlayers() {