Merge pull request #146 from dries007/Fly

Allow flight permissions to be player sensitive
This commit is contained in:
LexManos 2012-09-11 16:09:49 -07:00
commit 96c13d9049

View file

@ -9,6 +9,15 @@
{
this.setPlayerLocation(this.lastPosX, this.lastPosY, this.lastPosZ, var11, var12);
return;
@@ -314,7 +314,7 @@
AxisAlignedBB var33 = this.playerEntity.boundingBox.copy().expand((double)var27, (double)var27, (double)var27).addCoord(0.0D, -0.55D, 0.0D);
- if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !var2.isAABBNonEmpty(var33))
+ if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !var2.isAABBNonEmpty(var33) && !this.playerEntity.capabilities.allowFlying)
{
if (var29 >= -0.03125D)
{
@@ -388,7 +388,10 @@
double var12 = this.playerEntity.posZ - ((double)var7 + 0.5D);
double var14 = var8 * var8 + var10 * var10 + var12 * var12;