Fix zombie eye appearance (#19427)

This commit is contained in:
Doru991
2023-08-23 07:51:59 +03:00
committed by GitHub
parent f8bdfd6d26
commit ecd145b274
3 changed files with 16 additions and 2 deletions

View File

@@ -133,12 +133,15 @@ namespace Content.Server.Zombies
{
//store some values before changing them in case the humanoid get cloned later
zombiecomp.BeforeZombifiedSkinColor = huApComp.SkinColor;
zombiecomp.BeforeZombifiedEyeColor = huApComp.EyeColor;
zombiecomp.BeforeZombifiedCustomBaseLayers = new(huApComp.CustomBaseLayers);
if (TryComp<BloodstreamComponent>(target, out var stream))
zombiecomp.BeforeZombifiedBloodReagent = stream.BloodReagent;
_humanoidAppearance.SetSkinColor(target, zombiecomp.SkinColor, verify: false, humanoid: huApComp);
_humanoidAppearance.SetBaseLayerColor(target, HumanoidVisualLayers.Eyes, zombiecomp.EyeColor, humanoid: huApComp);
// Messing with the eye layer made it vanish upon cloning, and also it didn't even appear right
huApComp.EyeColor = zombiecomp.EyeColor;
// this might not resync on clone?
_humanoidAppearance.SetBaseLayerId(target, HumanoidVisualLayers.Tail, zombiecomp.BaseLayerExternal, humanoid: huApComp);