Skip to content

Commit

Permalink
Fix spawning (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
ITeMbI4 authored Jul 15, 2024
1 parent 3a20247 commit fdb75c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public RespawningTeamEventArgs(List<Player> players, int maxRespawn, SpawnableTe
MaxWaveSize = maxRespawn;
NextKnownTeam = nextKnownTeam;
SpawnQueue = new();
SpawnableTeam.GenerateQueue(SpawnQueue, players.Count);
IsAllowed = isAllowed;
}

Expand All @@ -58,6 +59,12 @@ public RespawningTeamEventArgs(List<Player> players, int maxRespawn, SpawnableTe
/// </summary>
public Queue<RoleTypeId> SpawnQueue { get; set; }

/// <summary>
/// Gets the current spawnable team.
/// </summary>
public SpawnableTeamHandlerBase SpawnableTeam
=> RespawnManager.SpawnableTeams.TryGetValue(NextKnownTeam, out SpawnableTeamHandlerBase @base) ? @base : null;

/// <summary>
/// Gets or sets a value indicating whether or not the spawn can occur.
/// </summary>
Expand Down

0 comments on commit fdb75c8

Please sign in to comment.