Skip to content

Commit

Permalink
Fixed sleeping in beds while morphed. Closes iChun#611. Closes iChun#620
Browse files Browse the repository at this point in the history
.
  • Loading branch information
iChun committed Oct 5, 2014
1 parent 13689b7 commit 76f3f2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/morph/client/core/TickHandlerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ else if(info.prevState != null && info.player != null)
}
//TODO make sure that the lack of sleep timer doesn't affect anything.
//if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || !info.player.isPlayerSleeping() && info.player.sleepTimer > 0))
if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || info.player.isPlayerSleeping()))
if(info.player != null && (info.player.dimension != mc.thePlayer.dimension || !info.player.isEntityAlive() || !world.playerEntities.contains(info.player) || (info.player.isPlayerSleeping() || info.player.getSleepTimer() > 0)))
{
info.player = null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/morph/common/core/EventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event)
Morph.proxy.tickHandlerServer.getMorphDataFromPlayer(event.player).setTag("morphState" + i, states.get(i).getTag());
}
}
Morph.proxy.tickHandlerServer.playerMorphs.remove(event.player.getCommandSenderName())
Morph.proxy.tickHandlerServer.playerMorphs.remove(event.player.getCommandSenderName());
Morph.proxy.tickHandlerServer.playerMorphInfo.remove(event.player.getCommandSenderName());
}

Expand Down

0 comments on commit 76f3f2e

Please sign in to comment.