feat: Skeletons can show their helmet
New "Show Helmet" option under Skeleton - Visuals, off by default. The owner's choice is written to the ZDO, so other players see the helmet the way its owner picked. On a skull the helmet moves up and back and grows to fit, since the skull is bigger than the viking head the helmet hangs for. Hoods and the other skinned helmets can't be moved by their transform: their Head bone is swapped for a fitted child bone, so the head part follows the skull and the shoulder parts stay put. A viking body gets the vanilla placement and bones back.
This commit is contained in:
parent
1aa55984d6
commit
e972ca5ea4
5 changed files with 259 additions and 30 deletions
|
|
@ -127,11 +127,10 @@ namespace RacesOfValheim
|
|||
vis.SetHairItem(0);
|
||||
vis.SetBeardItem(0);
|
||||
|
||||
// Hide Helmet
|
||||
// Hide Helmet, unless its owner chose to show it
|
||||
if (SkeletonConfig.BodyModelEnabled.Value)
|
||||
{
|
||||
var helmetObj = HarmonyLib.Traverse.Create(vis).Field<GameObject>("m_helmetItemInstance").Value;
|
||||
SkeletonVisuals.SetEquipmentPieceHidden(helmetObj, true);
|
||||
SkeletonVisuals.FitHelmet(m_player, vis, SkeletonVisuals.ShowsHelmet(m_player));
|
||||
}
|
||||
|
||||
// Scale Body Armor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue