Rebalance the maximum and default SpectatorDataThirdPersonInfo#shoulderCamSmoothness values (+1 squashed commit)

Squashed commits:
[d1374a7] Information about the shoulder camera's position are now stored in a separate, interpolateable Object instead of directly in the SpectatorData Object
This commit is contained in:
CrushedPixel
2015-09-09 23:23:33 +02:00
parent d839204855
commit 7196bc03bd
3 changed files with 58 additions and 29 deletions

View File

@@ -442,10 +442,10 @@ public abstract class GuiEditKeyframe<T extends KeyframeValue> extends GuiScreen
shoulderYawString = new GuiString(0, 0, Color.WHITE, I18n.format("replaymod.gui.editkeyframe.spec.method.shoulder.yaw"));
shoulderSmoothnessString = new GuiString(0, 0, Color.WHITE, I18n.format("replaymod.gui.editkeyframe.spec.method.shoulder.smoothness"));
shoulderDistanceInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, 0d, 30d, data.getShoulderCamDistance(), true, "", 0.1);
shoulderPitchOffsetInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, -90d, 90d, (double)data.getShoulderCamPitchOffset(), false, "°", 1);
shoulderYawOffsetInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, null, null, (double)data.getShoulderCamYawOffset(), false, "°", 1);
shoulderSmoothnessInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, 0.1d, 1d, data.getShoulderCamSmoothness()/1000d, true, "", 0.1);
shoulderDistanceInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, 0d, 30d, data.getThirdPersonInfo().shoulderCamDistance, true, "", 0.1);
shoulderPitchOffsetInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, -90d, 90d, data.getThirdPersonInfo().shoulderCamPitchOffset, false, "°", 1);
shoulderYawOffsetInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, null, null, data.getThirdPersonInfo().shoulderCamYawOffset, false, "°", 1);
shoulderSmoothnessInput = new GuiDraggingNumberInput(fontRendererObj, 0, 0, 0, 0.1d, 3d, data.getThirdPersonInfo().shoulderCamSmoothness, true, "", 0.1);
shoulderCamSettings = new ComposedElement(
shoulderDistanceString, shoulderDistanceInput,
@@ -486,10 +486,10 @@ public abstract class GuiEditKeyframe<T extends KeyframeValue> extends GuiScreen
public void onGuiClosed() {
SpectatorData data = (SpectatorData)keyframe.getValue();
data.setSpectatingMethod(SpectatorData.SpectatingMethod.values()[perspectiveButton.getValue()]);
data.setShoulderCamDistance(shoulderDistanceInput.getPreciseValue());
data.setShoulderCamPitchOffset(shoulderPitchOffsetInput.getIntValue());
data.setShoulderCamYawOffset(shoulderYawOffsetInput.getIntValue());
data.setShoulderCamSmoothness((int)(shoulderSmoothnessInput.getPreciseValue()*1000));
data.getThirdPersonInfo().shoulderCamDistance = shoulderDistanceInput.getPreciseValue();
data.getThirdPersonInfo().shoulderCamPitchOffset = shoulderPitchOffsetInput.getIntValue();
data.getThirdPersonInfo().shoulderCamYawOffset = shoulderYawOffsetInput.getIntValue();
data.getThirdPersonInfo().shoulderCamSmoothness = shoulderSmoothnessInput.getPreciseValue();
super.onGuiClosed();
}
}