Move moving unbuckling to update to avoid an event bus concurrent modification exception (#1509)

This commit is contained in:
DrSmugleaf
2020-07-28 08:37:03 +02:00
committed by GitHub
parent 264062cd15
commit bd7079278e
3 changed files with 69 additions and 33 deletions

View File

@@ -146,6 +146,22 @@ namespace Content.IntegrationTests.Tests
Assert.True(ActionBlockerSystem.CanMove(human));
Assert.True(ActionBlockerSystem.CanChangeDirection(human));
Assert.True(EffectBlockerSystem.CanFall(human));
// Re-buckle
Assert.True(buckle.TryBuckle(human, chair));
// Move away from the chair
human.Transform.WorldPosition += (1, 0);
});
server.RunTicks(1);
server.Assert(() =>
{
// No longer buckled
Assert.False(buckle.Buckled);
Assert.Null(buckle.BuckledTo);
Assert.IsEmpty(strap.BuckledEntities);
});
await server.WaitIdleAsync();