diff --git a/TrueCraft.Core/Logic/Blocks/FluidBlock.cs b/TrueCraft.Core/Logic/Blocks/FluidBlock.cs index b153125..cbad1b2 100644 --- a/TrueCraft.Core/Logic/Blocks/FluidBlock.cs +++ b/TrueCraft.Core/Logic/Blocks/FluidBlock.cs @@ -69,6 +69,8 @@ namespace TrueCraft.Core.Logic.Blocks public void ScheduleNextEvent(Coordinates3D coords, IWorld world, IMultiplayerServer server) { + if (world.GetBlockID(coords) == StillID) + return; var chunk = world.FindChunk(coords); server.Scheduler.ScheduleEvent("fluid", chunk, TimeSpan.FromSeconds(SecondsBetweenUpdates), (_server) => diff --git a/TrueCraft.Profiling/Profiler.cs b/TrueCraft.Profiling/Profiler.cs index 426d52a..bc1bbec 100644 --- a/TrueCraft.Profiling/Profiler.cs +++ b/TrueCraft.Profiling/Profiler.cs @@ -42,7 +42,7 @@ namespace TrueCraft.Profiling { ActiveTimers.Push(new ActiveTimer { - Started = Stopwatch.ElapsedMilliseconds, + Started = Stopwatch.ElapsedTicks, Finished = -1, Bucket = bucket }); @@ -54,12 +54,13 @@ namespace TrueCraft.Profiling if (ActiveTimers.Count > 0) { var timer = ActiveTimers.Pop(); - timer.Finished = Stopwatch.ElapsedMilliseconds; + timer.Finished = Stopwatch.ElapsedTicks; for (int i = 0; i < EnabledBuckets.Count; i++) { if (Match(EnabledBuckets[i], timer.Bucket)) { - Console.WriteLine("{0} took {1}ms", timer.Bucket, timer.Finished - timer.Started); + Console.WriteLine("{0} took {1}ms", timer.Bucket, + (timer.Finished - timer.Started) / 10000.0); break; } }