fix(fenrir): spawn sounds the way vanilla spawns effects, without ghost init
Ghost init was meant to keep a sound's ZNetView from writing a ZDO. It does not: ZNetView.Awake still creates the ZDO and only skips registering the instance, so ZNetScene sees an unbuilt ZDO and builds a second copy. Vanilla's EffectList.Create uses a plain Instantiate, and TimedDestruction deletes the ZDO through ZNetScene.Destroy when the sound ends. The spawn now does the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e4694f6cd9
commit
0674329592
2 changed files with 14 additions and 25 deletions
|
|
@ -81,8 +81,7 @@ namespace RacesOfValheim
|
|||
|
||||
if (!audible) return;
|
||||
|
||||
// Through the same ghost-init spawn as everything else here: some vanilla sound prefabs
|
||||
// carry a ZNetView, and this one fires every time the animation comes round.
|
||||
// Through the same spawn as every other Fenrir sound, so a change there reaches this too.
|
||||
FenrirCreatureSound.Spawn(prefab, transform.position);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue