changed controls

This commit is contained in:
drPepper 2014-07-31 18:21:16 +04:00
parent 0cf81874b4
commit a98429e24a

View file

@ -52,6 +52,8 @@ public final class EntityCamera extends EntityLivingBase
private float oldFOV;
private float oldSens;
private boolean isCentered = true;
public EntityCamera(World world, ChunkPosition pos, EntityPlayer player)
{
super(world);
@ -74,7 +76,6 @@ public final class EntityCamera extends EntityLivingBase
if (FMLCommonHandler.instance().getEffectiveSide().isClient())
{
mc.renderViewEntity.rotationYaw = player.rotationYaw;
//mc.renderViewEntity.rotationYawHead = player.rotationYawHead;
mc.renderViewEntity.rotationPitch = player.rotationPitch;
// Perform zoom
@ -89,7 +90,7 @@ public final class EntityCamera extends EntityLivingBase
ClientCameraUtils.resetCam();
this.setDead();
}
else if (Keyboard.isKeyDown(Keyboard.KEY_SPACE) && fireWaitTicks-- == 0)
else if (Mouse.isButtonDown(0) && fireWaitTicks-- == 0)
{
fireWaitTicks = 1;
@ -127,13 +128,19 @@ public final class EntityCamera extends EntityLivingBase
}
else if (Keyboard.isKeyDown(Keyboard.KEY_C)) //centering view
{
this.setPosition(xCoord + 0.5, yCoord + 0.75, zCoord + 0.5);
isCentered = !isCentered;
return;
}
}
// this.setPosition(xCoord + dx, yCoord + dy, zCoord + dz);
this.setPosition(xCoord + 0.5, yCoord + 0.75, zCoord + 0.5);
if (isCentered)
{
this.setPosition(xCoord + 0.5, yCoord + 0.75, zCoord + 0.5);
} else {
this.setPosition(xCoord + dx, yCoord + dy, zCoord + dz);
}
}
}