diff --git a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs
index 8a12f60f94..1cc7dfc8a9 100644
--- a/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs
+++ b/EXILED/Exiled.Events/Patches/Events/Player/ChangedAspectRatio.cs
@@ -12,6 +12,7 @@ namespace Exiled.Events.Patches.Events.Player
using API.Features.Pools;
using CentralAuth;
+ using Exiled.Events.Attributes;
using Exiled.Events.EventArgs.Player;
using HarmonyLib;
using UnityEngine;
@@ -22,6 +23,7 @@ namespace Exiled.Events.Patches.Events.Player
/// Patches .
/// Adds the event.
///
+ [EventPatch(typeof(Handlers.Player), nameof(Handlers.Player.ChangedRatio))]
[HarmonyPatch(typeof(AspectRatioSync), nameof(AspectRatioSync.UserCode_CmdSetAspectRatio__Single))]
internal class ChangedAspectRatio
{
@@ -29,17 +31,17 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions);
- LocalBuilder oldratio = generator.DeclareLocal(typeof(float));
+ LocalBuilder oldRatio = generator.DeclareLocal(typeof(float));
LocalBuilder hub = generator.DeclareLocal(typeof(ReferenceHub));
Label retLabel = generator.DefineLabel();
newInstructions.InsertRange(0, new CodeInstruction[]
{
- // float OldRatio = this.AspectRatio;
+ // float oldRatio = this.AspectRatio;
new(OpCodes.Ldarg_0),
new(OpCodes.Callvirt, PropertyGetter(typeof(AspectRatioSync), nameof(AspectRatioSync.AspectRatio))),
- new(OpCodes.Stloc_S, oldratio.LocalIndex),
+ new(OpCodes.Stloc_S, oldRatio.LocalIndex),
});
int index = newInstructions.FindLastIndex(i => i.opcode == OpCodes.Ret);
@@ -60,14 +62,13 @@ private static IEnumerable Transpiler(IEnumerable