Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(input): allow turn with hoverpack #125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/src/input/InputPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static bool handleAxisInput(ref Vector2 __result, int xAxisActionId, int
[HarmonyPatch(typeof(PlayerFirstPersonController), nameof(PlayerFirstPersonController.Move))]
static void Move(PlayerFirstPersonController __instance)
{
if (!__instance.m_IsGrounded || InputHandler.instance.playerInputBlocked || InputHandler.instance.playerInputBlockedOverride && VRCameraManager.mainCamera != null)
if ((!__instance.m_IsGrounded && !__instance.hoverPackActive) || InputHandler.instance.playerInputBlocked || InputHandler.instance.playerInputBlockedOverride && VRCameraManager.mainCamera != null)
{
return;
}
Expand Down
11 changes: 6 additions & 5 deletions plugin/src/util/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using UnityEngine;

namespace TechtonicaVR.Util;

Expand All @@ -22,22 +23,22 @@ public static PluginLogger GetLogger<T>()

public void LogInfo(string message)
{
TechtonicaVR.Logger.LogInfo($"[{prefix}] {message}");
TechtonicaVR.Logger.LogInfo($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogDebug(string message)
{
TechtonicaVR.Logger.LogDebug($"[{prefix}] {message}");
TechtonicaVR.Logger.LogDebug($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogWarning(string message)
{
TechtonicaVR.Logger.LogWarning($"[{prefix}] {message}");
TechtonicaVR.Logger.LogWarning($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogError(string message)
{
TechtonicaVR.Logger.LogError($"[{prefix}] {message}");
TechtonicaVR.Logger.LogError($"[{prefix}] ({Time.frameCount}) {message}");
}

internal void LogTrace(string v)
Expand All @@ -46,6 +47,6 @@ internal void LogTrace(string v)
{
return;
}
TechtonicaVR.Logger.LogDebug($"[{prefix}] {v}");
TechtonicaVR.Logger.LogDebug($"[{prefix}] ({Time.frameCount}) {v}");
}
}
Loading