Skip to content

Commit 2bd111e

Browse files
committed
Add in scuffed fix for swimming not reseting, cant do much else
1 parent 17024d0 commit 2bd111e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

code/Player/Player.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ public void Respawn()
141141

142142
Controller = new WalkController();
143143

144+
// TODO: Facepunch issue, need to set the water level, unable to remove the component without getting a null ref.
145+
// If the player respawns directly from water the water effect component doesn't get removed.
146+
if ( Components.TryGet<Sandbox.Component.WaterEffectComponent>( out var waterComponent ) )
147+
waterComponent.WaterLevel = 0;
148+
144149
CreateHull();
145150
CreateFlashlight();
146151
DressPlayer();

0 commit comments

Comments
 (0)