fix: Cultist breath holds the throw pose and keeps its flames
Pin at 1.3 s, the throw, instead of 2.6 s, where the vanilla Cultist has already lowered its arms. fx_fenring_flames is a one-throw effect (2 s non-looping emitters, 5 s TimedDestruction): loop the emitters and drop the timer so the flames last the whole hold.
This commit is contained in:
parent
d142fad330
commit
a6df7a47f8
1 changed files with 14 additions and 2 deletions
|
|
@ -326,11 +326,22 @@ namespace RacesOfValheim
|
|||
GameObject instance = Object.Instantiate(fireVfx, MouthPoint(player), player.transform.rotation, player.transform);
|
||||
instance.AddComponent<CultistFlameFollow>().Player = player;
|
||||
|
||||
// The vanilla effect is one throw, not a held breath: its emitters do not loop (2 s) and
|
||||
// a TimedDestruction removes it after 5 s, so a long hold went on draining eitr with no
|
||||
// fire. It loops here and lives until StopFire takes it down.
|
||||
TimedDestruction timer = instance.GetComponent<TimedDestruction>();
|
||||
if (timer != null)
|
||||
{
|
||||
timer.CancelInvoke();
|
||||
Object.Destroy(timer);
|
||||
}
|
||||
|
||||
// Aumentiamo la durata delle particelle del 20%
|
||||
foreach (ParticleSystem ps in instance.GetComponentsInChildren<ParticleSystem>())
|
||||
{
|
||||
var main = ps.main;
|
||||
main.startLifetimeMultiplier *= 1.2f;
|
||||
main.loop = true;
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
|
@ -1751,8 +1762,9 @@ namespace RacesOfValheim
|
|||
// The clip's Hit event, where the vanilla Cultist's flames come out.
|
||||
private const float FlamesAt = 1.245f;
|
||||
|
||||
// Inside the flaming stretch (1.245 to 3.193 s): the Animator stops here while held.
|
||||
private const float PinAt = 2.6f;
|
||||
// The throw itself: the Animator stops here while held. After it the vanilla Cultist lowers
|
||||
// its arms while its fire flies on alone, so a pin at 2.6 s held an idle-looking pose.
|
||||
private const float PinAt = 1.3f;
|
||||
|
||||
private const float Fade = 0.25f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue