chore(release): v1.4.21 - dragon form multiplayer sync, Sverm Ravager networking, dorsal spine fix
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
6499eb71df
commit
e7325e4d25
12 changed files with 303 additions and 10 deletions
|
|
@ -454,9 +454,19 @@ namespace RacesOfValheim
|
|||
// metres and degrees - what was ASKED for - not bone-local numbers.
|
||||
Quaternion wantedRotation = SvermConfigManagement.SpineRotation();
|
||||
|
||||
// Basing the whole crest AT the bone and growing it upward (ModelBorrow.Attach grounds
|
||||
// a borrowed model's bottom at the mount point) reached up past the shoulders and onto
|
||||
// the head once the crest got tall - Spine2's own local up axis runs toward the head,
|
||||
// not out and away from the back. Centring it on the bone instead - half its height
|
||||
// below the mount point, half above - keeps the same rotation an eye already approved
|
||||
// while stopping the Full Crest size from overshooting. SpineOffsetY is an additional
|
||||
// nudge along the same axis, for whatever still needs adjusting by eye.
|
||||
float wantedOffsetY = -wanted / 2f + SvermConfigManagement.SpineOffset;
|
||||
|
||||
SvermSpineTag tag = existing != null ? existing.GetComponent<SvermSpineTag>() : null;
|
||||
if (existing != null && (tag == null
|
||||
|| !Mathf.Approximately(tag.Size, wanted)
|
||||
|| !Mathf.Approximately(tag.OffsetY, wantedOffsetY)
|
||||
|| Quaternion.Angle(tag.Rotation, wantedRotation) > 0.5f))
|
||||
{
|
||||
existing.name = SpinesName + "_Removed";
|
||||
|
|
@ -474,7 +484,7 @@ namespace RacesOfValheim
|
|||
bone,
|
||||
SpinesName,
|
||||
SvermConfig.SpinesPrefab,
|
||||
Vector3.zero,
|
||||
new Vector3(0f, wantedOffsetY / lossy, 0f),
|
||||
wantedRotation,
|
||||
wanted / lossy,
|
||||
"Sverm");
|
||||
|
|
@ -484,6 +494,7 @@ namespace RacesOfValheim
|
|||
SvermSpineTag built = holder.AddComponent<SvermSpineTag>();
|
||||
built.Size = wanted;
|
||||
built.Rotation = wantedRotation;
|
||||
built.OffsetY = wantedOffsetY;
|
||||
existing = holder.transform;
|
||||
}
|
||||
|
||||
|
|
@ -532,6 +543,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
public float Size;
|
||||
public Quaternion Rotation = Quaternion.identity;
|
||||
public float OffsetY;
|
||||
}
|
||||
|
||||
// ─── Glide motes ─────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue