using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Agents;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using CullingSystem;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("NoSway")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+git5263776-dirty-master")]
[assembly: AssemblyProduct("NoSway")]
[assembly: AssemblyTitle("NoSway")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace NoSway
{
[BepInPlugin("hirnukuono-NoSway", "hirnukuono-NoSway", "0.0.1")]
internal class EntryPoint : BasePlugin
{
[HarmonyPatch(typeof(PlayerInventoryBase), "UpdateFPSFlashlightAlignment")]
internal class Inject_PlayerFlashlight
{
private static void Postfix(PlayerInventoryBase __instance)
{
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)__instance.Owner == (Object)null) && ((Agent)__instance.Owner).IsLocallyOwned && !((Object)(object)__instance.Owner.Owner == (Object)null) && !__instance.Owner.Owner.IsBot && !((Object)(object)__instance.Owner.FPSCamera == (Object)null) && __instance.m_flashlightCLight != null)
{
Camera camera = ((CameraController)__instance.Owner.FPSCamera).m_camera;
Light unityLight = ((C_Light)__instance.m_flashlightCLight).m_unityLight;
Vector3 val = ((Component)camera).transform.position + ((Component)camera).transform.forward * 6f - ((Component)unityLight).transform.position;
Vector3 normalized = ((Vector3)(ref val)).normalized;
((Component)unityLight).transform.rotation = Quaternion.LookRotation(Vector3.Lerp(normalized, ((Component)unityLight).transform.forward, 0f));
}
}
}
private Harmony _Harmony;
public override void Load()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Expected O, but got Unknown
_Harmony = new Harmony("NoSway");
_Harmony.PatchAll();
}
}
[GeneratedCode("VersionInfoGenerator", "2.0.0+git50a4b1a-master")]
[CompilerGenerated]
internal static class VersionInfo
{
public const string RootNamespace = "NoSway";
public const string Version = "1.0.0";
public const string VersionPrerelease = null;
public const string VersionMetadata = "git5263776-dirty-master";
public const string SemVer = "1.0.0+git5263776-dirty-master";
public const string GitRevShort = "5263776-dirty";
public const string GitRevLong = "5263776a5bdacb9ff8a9c8269e720fefd7ed559e-dirty";
public const string GitBranch = "master";
public const string GitTag = null;
public const bool GitIsDirty = true;
}
}