-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPlugin.cs
32 lines (25 loc) · 972 Bytes
/
Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using BepInEx;
using BepInEx.Configuration;
using GameNetcodeStuff;
using HarmonyLib;
using System.Reflection;
namespace SpectateEnemy;
[BepInPlugin("SpectateEnemy", "SpectateEnemy", "2.5.0")]
[BepInDependency("com.rune580.LethalCompanyInputUtils", BepInDependency.DependencyFlags.HardDependency)]
internal class Plugin : BaseUnityPlugin
{
public static MethodInfo raycastSpectate = null;
public static MethodInfo displaySpectatorTip = null;
public static Inputs Inputs = new();
public static ConfigFile Configuration;
private Harmony harmony;
private void Awake()
{
Configuration = Config;
harmony = new Harmony("SpectateEnemy");
harmony.PatchAll();
raycastSpectate = AccessTools.Method(typeof(PlayerControllerB), "RaycastSpectateCameraAroundPivot");
displaySpectatorTip = AccessTools.Method(typeof(HUDManager), "DisplaySpectatorTip");
Logger.LogInfo("SpectateEnemy loaded!");
}
}