Skip to content

Commit

Permalink
You can delete door blocks now when physics level is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Dec 11, 2020
1 parent f121fea commit dceaea4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs
Expand Up @@ -81,13 +81,12 @@ internal static class DeleteBehaviour {
}

internal static ChangeResult Door(Player p, BlockID old, ushort x, ushort y, ushort z) {
if (p.level.physics != 0) {
BlockID physForm;
PhysicsArgs args = ActivateablePhysics.GetDoorArgs(old, out physForm);
p.level.Blockchange(x, y, z, physForm, false, args);
return ChangeResult.Modified;
}
return ChangeResult.Unchanged;
if (p.level.physics == 0) return p.ChangeBlock(x, y, z, Block.Air);

BlockID physForm;
PhysicsArgs args = ActivateablePhysics.GetDoorArgs(old, out physForm);
p.level.Blockchange(x, y, z, physForm, false, args);
return ChangeResult.Modified;
}

internal static ChangeResult oDoor(Player p, BlockID old, ushort x, ushort y, ushort z) {
Expand Down

0 comments on commit dceaea4

Please sign in to comment.