diff --git a/RLBotCS/lib/Bridge.dll b/RLBotCS/lib/Bridge.dll index 8cc41ee..5bc49fb 100644 Binary files a/RLBotCS/lib/Bridge.dll and b/RLBotCS/lib/Bridge.dll differ diff --git a/RLBotCSTests/PlayerMappingTest.cs b/RLBotCSTests/PlayerMappingTest.cs index a59a200..5e3ab29 100644 --- a/RLBotCSTests/PlayerMappingTest.cs +++ b/RLBotCSTests/PlayerMappingTest.cs @@ -32,8 +32,10 @@ public void TestSpawnProcess() IsBot = true }; + // add pending spawn _playerMapping.AddPendingSpawn(spawnTracker); + // apply car spawn from known player var metadata = _playerMapping.ApplyCarSpawn(actorId, commandId); Assert.AreEqual(desiredIndex, _playerMapping.PlayerIndexFromActorId(actorId)); @@ -42,12 +44,14 @@ public void TestSpawnProcess() Assert.IsTrue(metadata.IsBot); Assert.IsTrue(!metadata.IsCustomBot); + // apply car spawn from unknown player var metadata2 = _playerMapping.ApplyCarSpawn(111, 222); uint? index = _playerMapping.PlayerIndexFromActorId(111); Assert.AreEqual(0u, _playerMapping.PlayerIndexFromActorId(111)); Assert.IsNotNull(index); - Assert.AreEqual(index, 0u); + Assert.AreEqual(0u, index); + Assert.IsNull(metadata2.SpawnId); Assert.AreEqual(desiredIndex, _playerMapping.PlayerIndexFromActorId(actorId)); Assert.IsTrue(!metadata2.IsBot); Assert.IsTrue(!metadata2.IsCustomBot); @@ -55,6 +59,5 @@ public void TestSpawnProcess() uint? index2 = _playerMapping.PlayerIndexFromActorId(456); Assert.IsNull(index2); - Assert.AreNotEqual(index2, 0u); } }