Skip to content

Commit

Permalink
Fixed issues with player size not being set properly, as well as othe…
Browse files Browse the repository at this point in the history
…r more major issues. Closes iChun#547
  • Loading branch information
iChun committed Jul 17, 2014
1 parent c63e8ce commit c368692
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
apply plugin: 'forge'

// Requires iChunUtil to run. Just put iChunUtil-deobf.jar in the /libs/ folder or it won't compile.
version = "0.8.1"
version = "0.9.0"
group= "morph" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Morph-Beta"

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/morph/client/core/TickHandlerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,10 @@ public void worldTick(TickEvent.ClientTickEvent event)

if(info.getMorphing())
{
// System.out.println(info.morphProgress);
// System.out.println(info.prevState);
// System.out.println(info.player);
// System.out.println(world.playerEntities.size());
info.morphProgress++;
if(info.morphProgress > 80)
{
Expand Down Expand Up @@ -754,7 +758,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 = 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 @@ -324,7 +324,7 @@ public void onRenderPlayer(RenderPlayerEvent.Pre event)
if(Morph.proxy.tickHandlerClient.playerMorphInfo.containsKey(event.entityPlayer.getCommandSenderName()))
{
MorphInfoClient info = Morph.proxy.tickHandlerClient.playerMorphInfo.get(event.entityPlayer.getCommandSenderName());
if(!event.entityPlayer.isPlayerSleeping())
if(!event.entityPlayer.isPlayerSleeping() && event.entityPlayer.worldObj.playerEntities.contains(event.entityPlayer))
{
info.player = event.entityPlayer;
}
Expand Down

0 comments on commit c368692

Please sign in to comment.