mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-13 09:15:59 -04:00
Fix fireworks not working on min borders of map
This commit is contained in:
parent
5ea3db341a
commit
dd57ed8f67
@ -63,11 +63,11 @@ namespace MCGalaxy.Blocks.Physics {
|
|||||||
lvl.AddUpdate(lvl.PosToInt(x, y, z), Block.Air);
|
lvl.AddUpdate(lvl.PosToInt(x, y, z), Block.Air);
|
||||||
|
|
||||||
int index;
|
int index;
|
||||||
for (ushort yy = (ushort)(y - (size + 1)); yy <= (ushort)(y + (size + 1)); ++yy)
|
for (int yy = y - (size + 1); yy <= y + (size + 1); ++yy)
|
||||||
for (ushort zz = (ushort)(z - (size + 1)); zz <= (ushort)(z + (size + 1)); ++zz)
|
for (int zz = z - (size + 1); zz <= z + (size + 1); ++zz)
|
||||||
for (ushort xx = (ushort)(x - (size + 1)); xx <= (ushort)(x + (size + 1)); ++xx)
|
for (int xx = x - (size + 1); xx <= x + (size + 1); ++xx)
|
||||||
{
|
{
|
||||||
if (lvl.IsAirAt(xx, yy, zz, out index) && rand.Next(1, 40) < 2) {
|
if (lvl.IsAirAt((ushort)xx, (ushort)yy, (ushort)zz, out index) && rand.Next(1, 40) < 2) {
|
||||||
PhysicsArgs args = default(PhysicsArgs);
|
PhysicsArgs args = default(PhysicsArgs);
|
||||||
args.Type1 = PhysicsArgs.Drop; args.Value1 = 100;
|
args.Type1 = PhysicsArgs.Drop; args.Value1 = 100;
|
||||||
args.Type2 = PhysicsArgs.Dissipate; args.Value2 = 25;
|
args.Type2 = PhysicsArgs.Dissipate; args.Value2 = 25;
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
permissions and limitations under the Licenses.
|
permissions and limitations under the Licenses.
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
|
using BlockID = System.UInt16;
|
||||||
|
|
||||||
namespace MCGalaxy.Commands.Fun {
|
namespace MCGalaxy.Commands.Fun {
|
||||||
public sealed class CmdExplode : Command {
|
public sealed class CmdExplode : Command {
|
||||||
public override string name { get { return "Explode"; } }
|
public override string name { get { return "Explode"; } }
|
||||||
|
@ -20,6 +20,7 @@ using System.Collections.Generic;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MCGalaxy.Maths;
|
using MCGalaxy.Maths;
|
||||||
using MCGalaxy.Tasks;
|
using MCGalaxy.Tasks;
|
||||||
|
using BlockID = System.UInt16;
|
||||||
|
|
||||||
namespace MCGalaxy.Commands.Fun {
|
namespace MCGalaxy.Commands.Fun {
|
||||||
public sealed class CmdGun : WeaponCmd {
|
public sealed class CmdGun : WeaponCmd {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user