fix(aswid): remove Cold on reset, so the Night Aura smoke stops following the next race

The black smoke was never an Aswid effect - it is vanilla's Cold, hijacked.
Aswid_ColdStatus_Patch renames the live instance to "Night Aura" and
AswidRace.ApplyNightAuraTint paints its vfx_Cold particles black and
doubles the particle count, both applied directly to the instance hanging
off the player. ResetRace cleared a dozen of the mod's own status effects
but never Cold, since Cold is not one of them - so the blackened instance
survived a race change and followed the player onto whatever they picked
next, "Night Aura" label included.

There is no untinting it: the original colours and emission rates were
never recorded before being overwritten. So ResetRace now removes Cold
outright instead. The night hands out a fresh, ordinary Cold moments
later if it's still cold, with nobody left to rename or repaint it.

Confirmed in game.
This commit is contained in:
kanym 2026-08-12 18:10:39 +02:00
commit bae4ae9da9

View file

@ -116,6 +116,21 @@ namespace RacesOfValheim
player.GetSEMan().RemoveStatusEffect(SvermConfig.StingerSE.GetStableHashCode());
player.GetSEMan().RemoveStatusEffect(SvermConfig.StingerCdSE.GetStableHashCode());
// COLD, which is not one of ours at all - and that is exactly why it has to go.
//
// The Aswid does not add a status effect for its night aura; it takes over the vanilla
// Cold that the night hands out anyway. Aswid_ColdStatus_Patch renames the instance to
// "Night Aura" and AswidRace.ApplyNightAuraTint paints its vfx_Cold particles black and
// doubles them, both applied to the LIVE instance hanging off the player and marked
// with NightAuraTintFlag so it is only done once.
//
// Nothing here used to remove it, so the blackened smoke - and the "Night Aura" label -
// simply stayed on through a race change and followed the player onto a Dvergar. There
// is no untinting it: the original colours and emission rates were never recorded. So
// the instance goes, and the night hands out a fresh, ordinary Cold within moments -
// this time with nobody left to rename or repaint it.
player.GetSEMan().RemoveStatusEffect("Cold".GetStableHashCode());
ZNetView nview = player.GetComponent<ZNetView>();
if (nview != null && nview.IsValid()) nview.GetZDO().Set("RacesOfValheim_Race", "Human");