diff --git a/EXILED/Exiled.API/Features/Items/Item.cs b/EXILED/Exiled.API/Features/Items/Item.cs index 2c32585711..22606adfda 100644 --- a/EXILED/Exiled.API/Features/Items/Item.cs +++ b/EXILED/Exiled.API/Features/Items/Item.cs @@ -311,7 +311,7 @@ public static T Get(ushort serial) BodyArmor => new Armor(type), AmmoItem => new Ammo(type), ToggleableLightItemBase => new Flashlight(type), - JailbirdItem jailbird => new Jailbird(jailbird), + JailbirdItem => new Jailbird(), ThrowableItem throwable => throwable.Projectile switch { FlashbangGrenade => new FlashGrenade(owner), diff --git a/EXILED/Exiled.API/Features/Pickups/Pickup.cs b/EXILED/Exiled.API/Features/Pickups/Pickup.cs index 95a54ccb5c..77998260a9 100644 --- a/EXILED/Exiled.API/Features/Pickups/Pickup.cs +++ b/EXILED/Exiled.API/Features/Pickups/Pickup.cs @@ -495,12 +495,12 @@ public static IEnumerable Get(IEnumerable gameObjects) ThrownProjectile thrownProjectile => thrownProjectile switch { BaseScp018Projectile => new Projectiles.Scp018Projectile(), - ExplosionGrenade explosionGrenade => new ExplosionGrenadeProjectile(explosionGrenade), + ExplosionGrenade explosionGrenade => new ExplosionGrenadeProjectile(type), FlashbangGrenade => new FlashbangProjectile(), BaseScp2176Projectile => new Projectiles.Scp2176Projectile(), EffectGrenade => new EffectGrenadeProjectile(type), TimeGrenade => new TimeGrenadeProjectile(type), - _ => new Projectile(thrownProjectile), + _ => new Projectile(type), }, _ => new Pickup(type), }; diff --git a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs index 64f6b34088..f5ba440058 100644 --- a/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs +++ b/EXILED/Exiled.API/Features/Roles/Scp3114Role.cs @@ -218,6 +218,11 @@ public float WarningTime set => Identity._warningTimeSeconds = value; } + /// + /// Gets or sets the next bound dance. + /// + public DanceType? NextDanceType { get; set; } + /// /// Gets or sets the bound dance. /// diff --git a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs index 12d1701c4e..49488a20bf 100644 --- a/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Scp3114/DancingEventArgs.cs @@ -29,7 +29,8 @@ public DancingEventArgs(bool newState, Player player, bool isAllowed = true) Player = player; Scp3114 = player.Role.As(); IsDancing = newState; - DanceType = (DanceType)(newState ? UnityEngine.Random.Range(0, Scp3114.Dance._danceVariants) : byte.MaxValue); + DanceType = newState ? (Scp3114.NextDanceType ?? (DanceType)UnityEngine.Random.Range(0, Scp3114.Dance._danceVariants)) : (DanceType)byte.MaxValue; + Scp3114.NextDanceType = null; IsAllowed = isAllowed; } diff --git a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs index e65bdbf03c..95b0080b36 100644 --- a/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs @@ -7,6 +7,7 @@ namespace Exiled.Events.EventArgs.Server { + using System; using System.Collections.Generic; using Exiled.API.Features; @@ -39,7 +40,7 @@ public RespawningTeamEventArgs(List players, int maxRespawn, SpawnableWa { Players = players; MaximumRespawnAmount = maxRespawn; - SpawnQueue = WaveSpawner.SpawnQueue; + Wave.PopulateQueue(SpawnQueue, MaximumRespawnAmount); Wave = new TimedWave((TimeBasedWave)wave); IsAllowed = true; } diff --git a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs index 37a470d8ac..47ae586a94 100644 --- a/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs +++ b/EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs @@ -84,6 +84,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instruction.Calls(Method(typeof(SpawnableWaveBase), nameof(SpawnableWaveBase.PopulateQueue)))) + offset; + List