Skip to content

Commit

Permalink
fix: Fix bug that broke vanilla autorun
Browse files Browse the repository at this point in the history
This happened when disabling AutorunToggle config
  • Loading branch information
afilbert committed Sep 9, 2023
1 parent a6c39e6 commit d0190bc
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 3 deletions.
Binary file modified Libs/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file modified Libs/UnityEngine.dll
Binary file not shown.
Binary file modified Libs/assembly_guiutils.dll
Binary file not shown.
Binary file modified Libs/assembly_utils.dll
Binary file not shown.
Binary file modified Libs/assembly_valheim.dll
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Built with [BepInEx](https://valheim.thunderstore.io/package/denikson/BepInExPac

Releases in github repo are packaged for Thunderstore Mod Manager.

* 0.1.2 Fix bug that disabled vanilla autorun when AutorunToggle was disabled in config
* 0.1.1 Fix bug that locked character movement after game patch 0.216.9
* 0.1.0 Fix bug that prevented alternative Run toggle key from instantiating correctly
* Fix regression bug caused by removing Esc key binding
Expand Down
9 changes: 6 additions & 3 deletions ToggleMovementMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ToggleMovementMod : BaseUnityPlugin
{
const string pluginGUID = "afilbert.ValheimToggleMovementMod";
const string pluginName = "Valheim - Toggle Movement Mod";
const string pluginVersion = "0.1.1";
const string pluginVersion = "0.1.2";
public static ManualLogSource logger;

private readonly Harmony _harmony = new Harmony(pluginGUID);
Expand Down Expand Up @@ -123,8 +123,11 @@ private static void Prefix(ref Player __instance, ref Vector3 movedir, ref bool
}

bool isWeaponLoaded = true;
autoRun = false;
___m_autoRun = false;
if (AutorunOverride.Value)
{
autoRun = false;
___m_autoRun = false;
}

bool equipmentAnimating = ___m_actionAnimation != null;

Expand Down
4 changes: 4 additions & 0 deletions ToggleMovementMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<Reference Include="0Harmony">
<HintPath>Libs\0Harmony.dll</HintPath>
</Reference>
<Reference Include="assembly_guiutils, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Libs\assembly_guiutils.dll</HintPath>
</Reference>
<Reference Include="assembly_utils, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Libs\assembly_utils.dll</HintPath>
Expand Down

0 comments on commit d0190bc

Please sign in to comment.