]> git.deb.at Git - rhonda/impostor.git/commitdiff
Adjust Polus Meeting table spawn locations
authorminiduikboot <mini@duikbo.at>
Tue, 15 Jun 2021 18:37:04 +0000 (20:37 +0200)
committerminiduikboot <mini@duikbo.at>
Fri, 25 Jun 2021 16:46:28 +0000 (18:46 +0200)
src/Impostor.Server/Net/Inner/Objects/ShipStatus/InnerPolusShipStatus.cs

index dccbeec2292245bc0e9a8673ed586a3cc31b479d..c7ccc2265284748db4e675a20d04032c1e3e2700 100644 (file)
@@ -36,13 +36,15 @@ namespace Impostor.Server.Net.Inner.Objects.ShipStatus
             }
 
             Vector2 position;
-            if (player.PlayerId < 5)
+            int halfPlayers = numPlayers / 2; // floored intentionally
+            int spawnId = player.PlayerId % 15;
+            if (player.PlayerId < halfPlayers)
             {
-                position = this.MeetingSpawnCenter + (new Vector2(1, 0) * player.PlayerId);
+                position = this.MeetingSpawnCenter + (new Vector2(0.6f, 0) * spawnId);
             }
             else
             {
-                position = this.MeetingSpawnCenter2 + (new Vector2(1, 0) * (player.PlayerId - 5));
+                position = this.MeetingSpawnCenter2 + (new Vector2(0.6f, 0) * (spawnId - halfPlayers));
             }
 
             return position;