Func clip vphysics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(updates)
(Revised article)
Line 1: Line 1:
{{lang|Func clip vphysics}}
{{lang|Func clip vphysics}}
{{base brush|func_clip_vphysics}} It is considered solid to [[VPhysics]] objects (such as a {{ent|prop_physics}}). [[QPhysics]] objects (such as {{ent|player}}s) can pass freely.
{{base brush|func_clip_vphysics}} It is considered solid to [[VPhysics]] objects (such as a {{ent|prop_physics}}). [[QPhysics]] objects (such as {{ent|player}}s) can pass freely.{{confirm}} It can also use a filter to only collide with specific objects.
 
{{bugfix|<code>Start Disabled</code> is a keyvalue in Hammer, but it is not present in the code. Use a {{ent|logic_auto}} and the <code>Disable</code> input instead.|In <code>bmodels.cpp</code>, find <code>BEGIN_DATADESC( CFuncVPhysicsClip )</code> and replace <code>DEFINE_FIELD( m_bDisabled, FIELD_BOOLEAN )</code> with <code>DEFINE_KEYFIELD( m_bDisabled, FIELD_BOOLEAN, "StartDisabled" )</code>. No changes to the FGDs or existing maps are required.|code}}
{{bug|'''Start Disabled''' is not present in code. Use a {{ent|logic_auto}} to <code>Disable</code> it. A code fix is available below.}}


{{code class|CFuncVPhysicsClip|bmodels.cpp}}
{{code class|CFuncVPhysicsClip|bmodels.cpp}}
Line 17: Line 16:
==Outputs==
==Outputs==
{{O BaseEntity|l4d=1}}
{{O BaseEntity|l4d=1}}
==Adding StartDisabled==
By default, StartDisabled is unsupported by this entity, but this can be easily corrected in code.
Find this line in the [[DataDesc]], in bmodels.cpp. It should be at line 1358:
<source lang=cpp>DEFINE_FIELD( m_bDisabled, FIELD_BOOLEAN ),</source>
Change <code>DEFINE_FIELD</code> to <code>DEFINE_KEYFIELD</code>, and add <code>"StartDisabled"</code> as the last parameter.
<source lang=cpp>DEFINE_KEYFIELD( m_bDisabled, FIELD_BOOLEAN, "StartDisabled" ),</source>


[[Category:Physics]]
[[Category:Physics]]

Revision as of 11:14, 19 September 2019

English (en)Translate (Translate)

Template:Base brush It is considered solid to VPhysics objects (such as a prop_physics). QPhysics objects (such as players) can pass freely.[confirm] It can also use a filter to only collide with specific objects.

Icon-Bug.pngBug:Start Disabled is a keyvalue in Hammer, but it is not present in the code. Use a logic_auto and the Disable input instead.  [todo tested in ?]
Cpp.pngCode Fix:In bmodels.cpp, find BEGIN_DATADESC( CFuncVPhysicsClip ) and replace DEFINE_FIELD( m_bDisabled, FIELD_BOOLEAN ) with DEFINE_KEYFIELD( m_bDisabled, FIELD_BOOLEAN, "StartDisabled" ). No changes to the FGDs or existing maps are required.
C++ In code, it is represented by theCFuncVPhysicsClipclass, defined in thebmodels.cppfile.

Keyvalues

Filter Name (filtername) ([todo internal name (i)]) <filter>
Filter to use to see if activator collides with this entity.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.


Outputs