using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Photon.Pun;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("BackFlip")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BackFlip")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("33573236-4109-42d5-9664-cfdc72aefe51")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoBackFlipFall;
[BepInPlugin("saphir.nobackflipfall", "NoBackFlipFall", "1.0.2")]
public class NoBackFlipFallPlugin : BaseUnityPlugin
{
[HarmonyPatch(typeof(CharacterAnimations), "PlayEmote")]
private static class PlayEmotePatch
{
[HarmonyPrefix]
private static bool Prefix(CharacterAnimations __instance, string emoteName)
{
if (emoteName != "A_Scout_Emote_BackFlip")
{
return true;
}
Character component = ((Component)__instance).GetComponent<Character>();
if ((Object)(object)component == (Object)null || !component.IsLocal)
{
return true;
}
component.refs.view.RPC("RPCA_PlayRemove", (RpcTarget)0, new object[2] { emoteName, false });
return false;
}
}
private const string PluginGUID = "saphir.nobackflipfall";
private const string PluginName = "NoBackFlipFall";
private const string PluginVersion = "1.0.0";
private Harmony harmony;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
harmony = new Harmony("saphir.nobackflipfall");
harmony.PatchAll();
}
private void OnDestroy()
{
Harmony obj = harmony;
if (obj != null)
{
obj.UnpatchSelf();
}
}
}