This article's documentation is for anything that uses the Source engine. Click here for more information.

Func water (Source): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 18: Line 18:


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{OtherKIO|func_door|All}}
{{KV|Move Direction (Pitch Yaw Roll)|intn=movedir|angle|The direction the water will move when it is told to 'Open'. Default value is "0 0 0".}}
{{KV|Wave Height|intn=WaveHeight|string|Default value is 3.0. No effect on stock shaders, as GoldSrc-style waves were removed in Retail Half-Life 2 (only existing in the leaked "beta").|deprecated=1}}
{{KV Door}}
 
==Flags==
{{fl|1|Starts Open}}
{{fl|256|Use Only}}
 
==Inputs==
{{I Door}}
 
==Outputs==
{{O Door}}

Revision as of 12:48, 19 March 2025

English (en)Translate (Translate)
edit
C++ Class hierarchy
CBaseDoor
CBaseToggle
CBaseEntity
C++ doors.cpp
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
It has since been deprecated by: func_water_analog. Non-moving water brushes should be part of worldspawn.

func_water is a brush entity available in all Source Source games. Legacy entity from the GoldSrc GoldSrc engine, deprecated by func_water_analog. It is still used in some Half-Life: Source Half-Life: Source maps.

Icon-Important.pngImportant:Does not work with the Water shader.
Refract can be used as a workaround for dynamic refraction with cubemapped reflections, although Valve does not provide any materials which do this.
Existing materials which are compatible include:
Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions.
Icon-Bug.pngBug:This entity always has its contents set to CONTENTS_WATER (regardless of brush contents), with no way of setting its contents to CONTENTS_SLIME. In most games, this will only affect splash particles.
Cpp.pngCode Fix:Add a KV that is read by CBaseDoor::CreateVPhysics to set fluid.contents (defaulting to CONTENTS_WATER if KV is absent)
  (tested in: SDK 2013 source code)
Cpp.pngCode:Both func_water and func_door are linked to CBaseDoor C++ class. The game code checks the classname KV to distinguish between them, applying specific behaviors if the classname is "func_water". As such, using AddOutput to change the classname of a func_water may have unexpected effects.

Keyvalues

Note.pngNote:All Keyvalues / Inputs / Outputs are same as func_door.