From 1e5c6393a6b29eb00dbb8fb137d86647cb0c356b Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Fri, 28 Jul 2023 22:06:03 +0100 Subject: Add TryUnstuck and death overlay --- code/phase/AssignPhase.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'code/phase/AssignPhase.cs') diff --git a/code/phase/AssignPhase.cs b/code/phase/AssignPhase.cs index 26c9fc1..0ae6bd2 100644 --- a/code/phase/AssignPhase.cs +++ b/code/phase/AssignPhase.cs @@ -21,9 +21,10 @@ public class AssignPhase : BasePhase var detectivesNeeded = 1; var murderersNeeded = 1; - List spawnpoints = Entity.All.OfType().OrderBy( x => Guid.NewGuid() ).ToList(); + Random random = new(); + List spawnpoints = Entity.All.OfType().OrderBy( _ => random.Next() ).ToList(); var clients = Game.Clients.ToList(); - foreach ( int i in Enumerable.Range( 0, clients.Count ).OrderBy( x => Guid.NewGuid() ) ) + foreach ( int i in Enumerable.Range( 0, clients.Count ).OrderBy( _ => random.Next() ) ) { var client = clients[i]; if (client.Pawn != null) @@ -60,7 +61,7 @@ public class AssignPhase : BasePhase var spawnpoint = spawnpoints[0]; spawnpoints.RemoveAt( 0 ); var tx = spawnpoint.Transform; - tx.Position = tx.Position + Vector3.Up * 50.0f; + tx.Position = tx.Position + Vector3.Up * 10.0f; pawn.Transform = tx; RoleOverlay.Show( To.Single( client ) ); -- cgit v1.2.3-70-g09d2