Skip to content

Commit

Permalink
Close TODO in Player.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamalexrouse committed Sep 26, 2024
1 parent 381d85d commit ddc5712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions EXILED/Exiled.Events/Handlers/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,7 @@ public class Player
/// Called before throwing a grenade.
/// </summary>
/// <param name="ev">The <see cref="ThrownProjectileEventArgs"/> instance.</param>
// TODO: rename that to OnThrownProjectile
public static void OnThrowingProjectile(ThrownProjectileEventArgs ev) => ThrownProjectile.InvokeSafely(ev);
public static void OnThrownProjectile(ThrownProjectileEventArgs ev) => ThrownProjectile.InvokeSafely(ev);

/// <summary>
/// Called before receving a throwing request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
new(OpCodes.Newobj, GetDeclaredConstructors(typeof(ThrownProjectileEventArgs))[0]),

// Handlers.Player.OnThrownProjectile(ev);
new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnThrowingProjectile))),
new(OpCodes.Call, Method(typeof(Handlers.Player), nameof(Handlers.Player.OnThrownProjectile))),
});

newInstructions[newInstructions.Count - 1].labels.Add(returnLabel);
Expand Down

0 comments on commit ddc5712

Please sign in to comment.