File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public override void OnEnabled()
7373 Handlers . Player . Verified += Handlers . Internal . Round . OnVerified ;
7474 Handlers . Map . ChangedIntoGrenade += Handlers . Internal . ExplodingGrenade . OnChangedIntoGrenade ;
7575
76+ RoleAssigner . OnPlayersSpawned += Handlers . Server . OnAllPlayersSpawned ;
7677 CharacterClassManager . OnRoundStarted += Handlers . Server . OnRoundStarted ;
7778 WaveManager . OnWaveSpawned += Handlers . Server . OnRespawnedTeam ;
7879 InventorySystem . InventoryExtensions . OnItemAdded += Handlers . Player . OnItemAdded ;
@@ -112,7 +113,7 @@ public override void OnDisabled()
112113 Handlers . Map . ChangedIntoGrenade -= Handlers . Internal . ExplodingGrenade . OnChangedIntoGrenade ;
113114
114115 CharacterClassManager . OnRoundStarted -= Handlers . Server . OnRoundStarted ;
115-
116+ RoleAssigner . OnPlayersSpawned -= Handlers . Server . OnAllPlayersSpawned ;
116117 InventorySystem . InventoryExtensions . OnItemAdded -= Handlers . Player . OnItemAdded ;
117118 InventorySystem . InventoryExtensions . OnItemRemoved -= Handlers . Player . OnItemRemoved ;
118119 WaveManager . OnWaveSpawned -= Handlers . Server . OnRespawnedTeam ;
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ public static class Server
3232 /// </summary>
3333 public static Event RoundStarted { get ; set ; } = new ( ) ;
3434
35+ /// <summary>
36+ /// Invoked after all players have spawned at the start of a new round.
37+ /// </summary>
38+ public static Event AllPlayersSpawned { get ; set ; } = new ( ) ;
39+
3540 /// <summary>
3641 /// Invoked before ending a round.
3742 /// </summary>
@@ -137,6 +142,11 @@ public static class Server
137142 /// </summary>
138143 public static void OnRoundStarted ( ) => RoundStarted . InvokeSafely ( ) ;
139144
145+ /// <summary>
146+ /// Called after all players have spawned at the start of a new round.
147+ /// </summary>
148+ public static void OnAllPlayersSpawned ( ) => AllPlayersSpawned . InvokeSafely ( ) ;
149+
140150 /// <summary>
141151 /// Called before ending a round.
142152 /// </summary>
@@ -245,4 +255,4 @@ public static class Server
245255 /// <param name="ev">The <see cref="CompletingObjectiveEventArgs"/> instance.</param>
246256 public static void OnCompletingObjective ( CompletingObjectiveEventArgs ev ) => CompletingObjective . InvokeSafely ( ev ) ;
247257 }
248- }
258+ }
You can’t perform that action at this time.
0 commit comments