mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix cloudy brush noise messages showing even when /ignore drawoutput is on. (Thanks tornato)
This commit is contained in:
parent
33561ee9d4
commit
d0de51ef5d
@ -47,7 +47,10 @@ namespace MCGalaxy.Drawing.Brushes {
|
|||||||
public override string Name { get { return "Cloudy"; } }
|
public override string Name { get { return "Cloudy"; } }
|
||||||
|
|
||||||
public unsafe override void Configure(DrawOp op, Player p) {
|
public unsafe override void Configure(DrawOp op, Player p) {
|
||||||
|
if (!p.Ignores.DrawOutput) {
|
||||||
Player.Message(p, "Calculating noise distribution...");
|
Player.Message(p, "Calculating noise distribution...");
|
||||||
|
}
|
||||||
|
|
||||||
// Initalise our noise histogram
|
// Initalise our noise histogram
|
||||||
const int accuracy = 10000;
|
const int accuracy = 10000;
|
||||||
int* values = stackalloc int[accuracy];
|
int* values = stackalloc int[accuracy];
|
||||||
@ -96,8 +99,11 @@ namespace MCGalaxy.Drawing.Brushes {
|
|||||||
sum += values[i] / (float)volume;
|
sum += values[i] / (float)volume;
|
||||||
}
|
}
|
||||||
thresholds[blocks.Length - 1] = 1;
|
thresholds[blocks.Length - 1] = 1;
|
||||||
|
|
||||||
|
if (!p.Ignores.DrawOutput) {
|
||||||
Player.Message(p, "Finished calculating, now drawing.");
|
Player.Message(p, "Finished calculating, now drawing.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int next;
|
int next;
|
||||||
public override BlockID NextBlock(DrawOp op) {
|
public override BlockID NextBlock(DrawOp op) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user