mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix negative number of blocks affected in vertical /torus (Tanks HackerXXX)
This commit is contained in:
parent
91c9ae1df9
commit
14a2511081
@ -26,7 +26,7 @@ namespace MCGalaxy.Drawing.Ops {
|
||||
public override long BlocksAffected(Level lvl, Vec3S32[] marks) {
|
||||
double rx = (Max.X - Min.X) / 2.0 + 0.25, ry = (Max.Y - Min.Y) / 2.0 + 0.25, rz = (Max.Z - Min.Z) / 2.0 + 0.25;
|
||||
double rTube = ry, rCentre = Math.Min(rx, rz) - rTube;
|
||||
return (int)(2 * Math.PI * Math.PI * rTube * rTube * rCentre);
|
||||
return (int)(2 * Math.PI * Math.PI * rTube * rTube * Math.Abs(rCentre));
|
||||
}
|
||||
|
||||
public override void Perform(Vec3S32[] marks, Brush brush, Action<DrawOpBlock> output) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user