Skip to content

Commit

Permalink
Fix unable to use mouse and keyboard controls
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboPhred committed Aug 5, 2020
1 parent 3da2c2c commit 8a4d4f2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changes

## 1.1.2

- Fix inability to use mouse and keyboard while mod is installed

## 1.1.1

- Fix left over debug code suppressing crash logs

## 1.1.0

- Add config file support for defining devices and inputs

## 1.0.3

- Fix gun animation break and eventual crash when input is received when paused or tabbed out.
Expand Down
2 changes: 1 addition & 1 deletion src/OrientationInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static Vector3 ApplySixAxisRotation(Vector3 vector)
return vector;
}

return InputHandler.Rotation;
return VectorUtils.Clamp(vector + InputHandler.Rotation, -1f, 1f);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/SixAxisPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace RoboPhredDev.Shipbreaker.SixAxis
{

[BepInPlugin("net.robophreddev.shipbreaker.SixAxis", "Six Axis Joystick support for Shipbreaker", "1.1.1.0")]
[BepInPlugin("net.robophreddev.shipbreaker.SixAxis", "Six Axis Joystick support for Shipbreaker", "1.1.2.0")]
public class SixAxisPlugin : BaseUnityPlugin
{
public static SixAxisPlugin Instance;
Expand Down
2 changes: 1 addition & 1 deletion src/ThrustInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static Vector3 ApplySixAxisTranslation(Vector3 vector)
return vector;
}

return InputHandler.Translation;
return VectorUtils.Clamp(vector + InputHandler.Translation, -1f, 1f);
}
}
}

0 comments on commit 8a4d4f2

Please sign in to comment.