Fix some properties not getting reset for PlayerLocation. (Fixes

freezing.)
This commit is contained in:
asofold 2012-10-10 02:58:06 +02:00
parent 07994c6a34
commit 96f9232dae

View File

@ -360,13 +360,24 @@ public class PlayerLocation {
world = location.getWorld();
worldServer = ((CraftWorld) world).getHandle();
typeId = typeIdBelow = null;
aboveStairs = inLava = inWater = inWeb = onGround = onIce = onLadder = null;
typeId = typeIdBelow = data = null;
aboveStairs = inLava = inWater = inWeb = onGround = onIce = onLadder = passable = null;
// TODO: consider idCache.setAccess.
this.setyOnGround(yFreedom);
}
/**
* Set some references to null.
*/
public void cleanup(){
entity = null;
world = null;
worldServer = null;
boundingBox = null;
idCache = null;
}
public double getyOnGround() {
return yOnGround;
@ -481,16 +492,6 @@ public class PlayerLocation {
this.idCache = cache;
}
/**
* Set some references to null.
*/
public void cleanup(){
entity = null;
world = null;
worldServer = null;
boundingBox = null;
idCache = null;
}
public WorldServer getWorldServer() {
return worldServer;