Fix markings for character preview (#7946)

This commit is contained in:
metalgearsloth
2022-05-05 18:47:32 +10:00
committed by GitHub
parent 7ea57bd47b
commit 0121025d12

View File

@@ -562,18 +562,13 @@ namespace Content.Client.Preferences.UI
private void RebuildSpriteView()
{
var species = Profile?.Species ?? SpeciesManager.DefaultSpecies;
var dollProto = _prototypeManager.Index<SpeciesPrototype>(species).DollPrototype;
if (_lastSpecies != species)
{
var dollProto = _prototypeManager.Index<SpeciesPrototype>(species).DollPrototype;
if (_previewDummy != null)
_entMan.DeleteEntity(_previewDummy!.Value);
_previewDummy = _entMan.SpawnEntity(dollProto, MapCoordinates.Nullspace);
_lastSpecies = species;
}
if (_previewDummy != null)
_entMan.DeleteEntity(_previewDummy!.Value);
_previewDummy = _entMan.SpawnEntity(dollProto, MapCoordinates.Nullspace);
_lastSpecies = species;
var sprite = _entMan.GetComponent<SpriteComponent>(_previewDummy!.Value);
if (_previewSprite == null)