diff --git a/Exiled.API/Enums/SpawnReason.cs b/Exiled.API/Enums/SpawnReason.cs
index d5ab04e202..7ec27b04d0 100644
--- a/Exiled.API/Enums/SpawnReason.cs
+++ b/Exiled.API/Enums/SpawnReason.cs
@@ -53,8 +53,13 @@ public enum SpawnReason : byte // TOTO: Remove this file and use Basegame
ForceClass,
///
- /// The user will be destroyed.
+ /// The player will be destroyed.
///
Destroyed,
+
+ ///
+ /// The player was spawned due to the usage of an item.
+ ///
+ ItemUsage,
}
-}
\ No newline at end of file
+}
diff --git a/Exiled.API/Features/DamageHandlers/AttackerDamageHandler.cs b/Exiled.API/Features/DamageHandlers/AttackerDamageHandler.cs
index b7d51716a2..d0660827ee 100644
--- a/Exiled.API/Features/DamageHandlers/AttackerDamageHandler.cs
+++ b/Exiled.API/Features/DamageHandlers/AttackerDamageHandler.cs
@@ -8,6 +8,7 @@
namespace Exiled.API.Features.DamageHandlers
{
using CustomPlayerEffects;
+ using PlayerRoles;
using BaseHandler = PlayerStatsSystem.DamageHandlerBase;
diff --git a/Exiled.API/Features/Roles/Scp1507Role.cs b/Exiled.API/Features/Roles/Scp1507Role.cs
index 7661f3c8aa..ac958f9d78 100644
--- a/Exiled.API/Features/Roles/Scp1507Role.cs
+++ b/Exiled.API/Features/Roles/Scp1507Role.cs
@@ -9,6 +9,8 @@ namespace Exiled.API.Features.Roles
{
using System.Collections.Generic;
using System.Linq;
+
+ using Exiled.API.Enums;
using Exiled.API.Interfaces;
using PlayerRoles;
using PlayerRoles.PlayableScps.HumeShield;
diff --git a/Exiled.API/Features/Scp1507Ragdoll.cs b/Exiled.API/Features/Scp1507Ragdoll.cs
index dcb4b28536..72be44bb3e 100644
--- a/Exiled.API/Features/Scp1507Ragdoll.cs
+++ b/Exiled.API/Features/Scp1507Ragdoll.cs
@@ -1,4 +1,5 @@
// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
//
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
diff --git a/Exiled.API/Features/Scp956.cs b/Exiled.API/Features/Scp956.cs
index 4ab776a61f..ff87c24722 100644
--- a/Exiled.API/Features/Scp956.cs
+++ b/Exiled.API/Features/Scp956.cs
@@ -1,4 +1,4 @@
-// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
//
// Copyright (c) Exiled Team. All rights reserved.
// Licensed under the CC BY-SA 3.0 license.
@@ -105,6 +105,6 @@ public static IEnumerable AvailableZones
/// Spawns behind the specified target.
///
/// Player to spawn. If is , will be chosen random.
- public static void SpawnBehindTarget(Player target = null) => Singleton.SpawnBehindTarget((target ?? Player.List.Random()).ReferenceHub);
+ public static void SpawnBehindTarget(Player target = null) => Singleton.SpawnBehindTarget((target ?? Player.List.GetRandomValue()).ReferenceHub);
}
}
\ No newline at end of file
diff --git a/Exiled.CustomItems/API/Features/CustomWeapon.cs b/Exiled.CustomItems/API/Features/CustomWeapon.cs
index 0a0311b8de..b849701f35 100644
--- a/Exiled.CustomItems/API/Features/CustomWeapon.cs
+++ b/Exiled.CustomItems/API/Features/CustomWeapon.cs
@@ -197,6 +197,16 @@ private void OnInternalReloading(ReloadingWeaponEventArgs ev)
if (!Check(ev.Player.CurrentItem))
return;
+ Log.Debug($"{nameof(Name)}.{nameof(OnInternalReloading)}: Reloading weapon. Calling external reload event..");
+ OnReloading(ev);
+
+ Log.Debug($"{nameof(Name)}.{nameof(OnInternalReloading)}: External event ended. {ev.IsAllowed}");
+ if (!ev.IsAllowed)
+ {
+ Log.Debug($"{nameof(Name)}.{nameof(OnInternalReloading)}: External event turned is allowed to false, returning.");
+ return;
+ }
+
Log.Debug($"{nameof(Name)}.{nameof(OnInternalReloading)}: Continuing with internal reload..");
ev.IsAllowed = false;
@@ -300,4 +310,4 @@ private void OnInternalHurting(HurtingEventArgs ev)
OnHurting(ev);
}
}
-}
+}
\ No newline at end of file
diff --git a/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs b/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs
index d4d360456d..a921274f01 100644
--- a/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs
+++ b/Exiled.Events/Patches/Events/Scp2536/FindingPosition.cs
@@ -16,6 +16,7 @@ namespace Exiled.Events.Patches.Events.Scp2536
using Exiled.Events.Attributes;
using Exiled.Events.EventArgs.Scp2536;
using HarmonyLib;
+ using UnityEngine;
using static HarmonyLib.AccessTools;