Fix rested carry weight shard losing comfort bonus - #34
Conversation
|
For visibility before this merges: a follow-up test found that the stored Rested comfort can survive a character change, because |
Merge follow up changes that scope cached comfort to the active SE_Rested instance and clear it on both Stop and OnDestroy. This prevents Rested comfort from leaking across character changes while preserving the intended carry weight behavior.
|
Follow-up testing found a character switch lifecycle edge case where the cached Rested comfort could carry over to a new SE_Rested instance. I’ve merged the follow-up fix, which scopes the cached comfort to the active Rested effect and clears it on both Stop and OnDestroy. |
Summary
GainMaxCarryWeightFromRestedcurrently callsPlayer.GetComfortLevel()when carry weight is calculated.Because that value represents the player's current environmental comfort, the shard bonus decreases or disappears after leaving the comfort area even though the Rested status effect is still active.
This change stores the comfort level associated with the current Rested effect and uses that value for the carry weight bonus instead.
Behavior
Testing
Tested against Valheim 1.0.16 and Epic Loot 0.14.13.
Verified: