Fix test threading (#31669)

This commit is contained in:
metalgearsloth
2024-08-31 12:35:30 +10:00
committed by GitHub
parent 9183c50d81
commit 849d3d9f5c
5 changed files with 32 additions and 16 deletions

View File

@@ -143,10 +143,10 @@ public sealed class SuicideCommandTests
mobStateComp = entManager.GetComponent<MobStateComponent>(player);
mobThresholdsComp = entManager.GetComponent<MobThresholdsComponent>(player);
damageableComp = entManager.GetComponent<DamageableComponent>(player);
});
if (protoMan.TryIndex<DamageTypePrototype>("Slash", out var slashProto))
damageableSystem.TryChangeDamage(player, new DamageSpecifier(slashProto, FixedPoint2.New(46.5)));
if (protoMan.TryIndex<DamageTypePrototype>("Slash", out var slashProto))
damageableSystem.TryChangeDamage(player, new DamageSpecifier(slashProto, FixedPoint2.New(46.5)));
});
// Check that running the suicide command kills the player
// and properly ghosts them without them being able to return to their body