Skip to content

Commit

Permalink
28
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jul 12, 2016
1 parent a7dc04b commit 3afa4e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/com/mtbs3d/minecrift/provider/MCOpenVR.java
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ private static void processHotbar() {

public static boolean setKeyboardOverlayShowing(boolean showingState, GuiTextField gui) {
try {
if(mc.vrSettings.seated) showingState = false;
keyboardGui = gui;
int ret = 1;
if (showingState) {
Expand Down Expand Up @@ -1978,12 +1979,12 @@ private static void updateAim() {
double v = Mouse.getY() / (double) mc.displayHeight * 180 - 90;

if(Display.isActive()){
if(h < -54){
if(h < -30){
mc.vrSettings.vrWorldRotation +=1;
hmdForwardYaw = (float)Math.toDegrees(Math.atan2(headDirection.x, headDirection.z));
mc.vrPlayer.checkandUpdateRotateScale(true);
}
if(h > 54){
if(h > 30){
mc.vrSettings.vrWorldRotation -=1;
hmdForwardYaw = (float)Math.toDegrees(Math.atan2(headDirection.x, headDirection.z));
mc.vrPlayer.checkandUpdateRotateScale(true);
Expand Down
5 changes: 3 additions & 2 deletions src/com/mtbs3d/minecrift/provider/OpenVRPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ public void onLivingUpdate(EntityPlayerSP player, Minecraft mc, Random rand)
if(!player.initFromServer) return;
updateSwingAttack();

if(mc.vrSettings.seated) freeMoveMode = true;

this.checkandUpdateRotateScale(false);

/** MINECRIFT */
Expand All @@ -181,8 +183,7 @@ public void onLivingUpdate(EntityPlayerSP player, Minecraft mc, Random rand)
} else {
// player.height = 1.8f;
}



if (getFreeMoveMode()) {
if(player.movementInput.moveForward ==0) doPlayerMoveInRoom(player);
NetworkHelper.sendVRPlayerPositions(this);
Expand Down

0 comments on commit 3afa4e4

Please sign in to comment.