Blasted_Swimming_Tarred_Bug_Fix

1.0.3 ✓ Scan successful

Fix for the long-running Valheim bug where players, carts, or other floating objects can stay stuck in water/swimming/tarred state after leaving a liquid trigger, teleporting, changing scene, or moving below the old liquid surface height.

Client & Server

BlastedSwimmingTarredBugFix


Prevents stale water/tar state from making players, carts, or floating objects stay stuck swimming or tarred after leaving a liquid trigger.

What It Fixes

  • Random swimming while nowhere near water.
  • Random tarred state after leaving a Plains tar pit.
  • Portal, dungeon, or scene transitions leaving old liquid state behind.
  • Carts or floating objects keeping water/tar state after a missed trigger exit.

How It Works

Valheim liquid volumes keep a list of objects currently inside water or tar. If OnTriggerExit is missed, an old WaterVolume or LiquidSurface can keep sending positive SetLiquidLevel(...) updates to an object that already left.

This mod keeps the fix narrow:

  • Reject stale positive liquid updates when the source no longer overlaps the target.
  • Remove stale entries from WaterVolume and LiquidSurface before floater updates.
  • Clamp water/tar counters so missed exits cannot drive them below zero.
  • Clear purged stale liquid state only when no current liquid trigger overlaps the target.
  • Clear player liquid state at teleport start; destination triggers restore it if the player arrives in liquid.

Configuration

Only four options are exposed:

[General]
LockConfiguration = true
Enabled = true
BoundsPadding = 0.75

[Debug]
DebugLogging = false

Enabled turns all runtime protection on or off.

LockConfiguration lets the server control synced options.

BoundsPadding adds a small margin to liquid/target bounds checks. Keep the default unless legitimate shallow water or tar is rejected.

DebugLogging logs rejected liquid updates and stale purges. Leave it off during normal play.

Github

https://github.com/sighsorry1029/BlastedSwimmingTarredBugFix


Threads

No threads yet.

Log in to post a thread.

Manual installation instructions
1

Install BepInEx

BepInEx is the mod loader required to run mods in Valheim.

Download BepInEx 5.4.2333 · View mod page

Check out the mod page for detailed installation instructions.

2

Install Blasted_Swimming_Tarred_Bug_Fix

This mod needs to be installed on both your client and server.

Download Blasted_Swimming_Tarred_Bug_Fix 1.0.3

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.