17 lines
515 B
C#
17 lines
515 B
C#
using HarmonyLib;
|
|
using System.Reflection;
|
|
|
|
[HarmonyPatch(typeof(CharacterMovement), "GetMovementForce")]
|
|
public static class Speed
|
|
{
|
|
private static readonly FieldInfo character = typeof(CharacterMovement).GetField("character", BindingFlags.NonPublic | BindingFlags.Instance);
|
|
|
|
public static void Postfix(CharacterMovement __instance, ref float __result)
|
|
{
|
|
if (ReferenceEquals(character.GetValue(__instance), Character.localCharacter))
|
|
{
|
|
__result *= 5F;
|
|
}
|
|
}
|
|
}
|