🔖 LambdaControls v1.0.1: Fixed broken tutorial toasts with controller.

This commit is contained in:
LambdAurora
2019-12-20 00:00:55 +01:00
parent 8ac0ee175f
commit 70a4213001
2 changed files with 8 additions and 5 deletions

View File

@@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.15
yarn_mappings=1.15+build.2:v2
minecraft_version=1.15.1
yarn_mappings=1.15.1+build.3:v2
loader_version=0.7.2+build.174
# Mod Properties
mod_version = 1.0.0
mod_version = 1.0.1
maven_group = me.lambdaurora
archives_base_name = lambdacontrols

View File

@@ -161,13 +161,16 @@ public class LambdaInput
{
if ((client.currentScreen == null || client.currentScreen instanceof TouchscreenOverlay) &&
(this.prev_target_yaw != this.target_yaw || this.prev_target_pitch != this.target_pitch)) {
float rotation_yaw = (float) (client.player.prevYaw + (this.target_yaw - client.player.prevYaw) * client.getTickDelta());
float rotation_pitch = (float) (client.player.prevPitch + (this.target_pitch - client.player.prevPitch) * client.getTickDelta());
float delta_yaw = (float) ((this.target_yaw - client.player.prevYaw) * client.getTickDelta());
float delta_pitch = (float) ((this.target_pitch - client.player.prevPitch) * client.getTickDelta());
float rotation_yaw = client.player.prevYaw + delta_yaw;
float rotation_pitch = client.player.prevPitch + delta_pitch;
client.player.yaw = rotation_yaw;
client.player.pitch = MathHelper.clamp(rotation_pitch, -90.F, 90.F);
if (client.player.isRiding()) {
client.player.getVehicle().copyPositionAndRotation(client.player);
}
client.getTutorialManager().onUpdateMouse(delta_pitch, delta_yaw);
}
}