diff --git a/Drawing/DrawOps/DrawOp.cs b/Drawing/DrawOps/DrawOp.cs index b61625053..44f8c2203 100644 --- a/Drawing/DrawOps/DrawOp.cs +++ b/Drawing/DrawOps/DrawOp.cs @@ -96,7 +96,7 @@ namespace MCGalaxy.Drawing.Ops { Coords.X = x; Coords.Y = y; Coords.Z = z; Coords.Block = brush.NextBlock(this); - if (Coords.Block != Block.Zero) + if (Coords.Block == Block.custom_block) Coords.ExtBlock = brush.NextExtBlock(this); return Coords; } diff --git a/Levels/BlockDefinitions.cs b/Levels/BlockDefinitions.cs index 3b9cb84bf..3fa04bfc8 100644 --- a/Levels/BlockDefinitions.cs +++ b/Levels/BlockDefinitions.cs @@ -244,10 +244,11 @@ namespace MCGalaxy { // therefore raw = 64log2(speed) + 128 byte rawSpeed = (byte)(64 * Math.Log(def.Speed, 2) + 128); buffer[index++] = def.BlockID; - Encoding.ASCII.GetBytes(def.Name.PadRight(64), 0, 64, buffer, index); - index += 64; + NetUtils.WriteAscii(def.Name, buffer, index); + index += 64; buffer[index++] = def.CollideType; buffer[index++] = rawSpeed; + buffer[index++] = def.TopTex; if (uniqueSideTexs) { buffer[index++] = def.LeftTex; diff --git a/Levels/Level.Blocks.cs b/Levels/Level.Blocks.cs index 28ffeabf9..cfbffdec1 100644 --- a/Levels/Level.Blocks.cs +++ b/Levels/Level.Blocks.cs @@ -178,12 +178,12 @@ namespace MCGalaxy { if (p.Rank < LevelPermission.Admin) { bool foundDel = FindZones(p, x, y, z, ref inZone, ref AllowBuild, ref Owners); if (!AllowBuild) { - if (p.ZoneSpam.AddSeconds(2) <= DateTime.UtcNow) { + if (p.ZoneSpam <= DateTime.UtcNow) { if (Owners != "") Player.Message(p, "This zone belongs to &b" + Owners.Remove(0, 2) + "."); else Player.Message(p, "This zone belongs to no one."); - p.ZoneSpam = DateTime.UtcNow; + p.ZoneSpam = DateTime.UtcNow.AddSeconds(2); } return false; } @@ -222,17 +222,17 @@ namespace MCGalaxy { bool CheckRank(Player p, bool AllowBuild, bool inZone) { if (p.Rank < permissionbuild && (!inZone || !AllowBuild)) { - if (p.ZoneSpam.AddSeconds(2) <= DateTime.UtcNow) { + if (p.ZoneSpam <= DateTime.UtcNow) { Player.Message(p, "Must be at least " + PermissionToName(permissionbuild) + " to build here"); - p.ZoneSpam = DateTime.UtcNow; + p.ZoneSpam = DateTime.UtcNow.AddSeconds(2); } return false; } if (p.Rank > perbuildmax && (!inZone || !AllowBuild) && !p.group.CanExecute("perbuildmax")) { - if (p.ZoneSpam.AddSeconds(2) <= DateTime.UtcNow) { + if (p.ZoneSpam <= DateTime.UtcNow) { Player.Message(p, "Your rank must be " + perbuildmax + " or lower to build here!"); - p.ZoneSpam = DateTime.UtcNow; + p.ZoneSpam = DateTime.UtcNow.AddSeconds(2); } return false; }