blackmesa_viewmodel

From Valve Developer Community
Jump to: navigation, search
Info.png
This entity is not in the FGD by default.
It should not be put directly in a map because it can only be configured through code.

blackmesa_viewmodel is a point entity available in Black Mesa Black Mesa. This game uses its own classname for viewmodel entity (the mod version still uses the original classname). Unique from other games in the ability to apply blood/slime to the models and bobbing customization via cvars. All inputs are same as CBaseAnimating.

Represented by class CBlackMesaViewModel.

Tip.pngTip:You can use SetBodyGroup input to change arms in your singleplayer map. Just add logic_auto that will fire this input via OnLoadGame and OnMapSpawn outputs.
Note.pngNote:Don't use this tip if your are using crossbow, RPG, frag, satchel, tripmine and/or snark in your map. This trick will disable some parts of the models for these weapons after save reload.
Note.pngNote:Console command viewmodel_fov is removed due to CSM lighting layer on viewmodel. You can edit viewmodel fov for each weapon separately by changing their .dmx files.
Icon-Bug.pngBug:The blood/slime splatter overlay is unfinished/broken in current versions of the game. The issues is:
  • Heavy short freeze in the game when applied for the first time (not in Black Mesa).
  • Frags, satchels, tripmines and snarks doesn't save blood overlay when used (new one in hand saves it) (not in Black Mesa with exception of snarks).
  • Slime doesn't applies for hands of each weapon model.
  • Slime doesn't applies to the hands if the weapon model was already covered in blood.
  • Blood/slime saves in multiplayer after death.

Dedicated Console Variables

Cvar/CommandParameters or default valueDescriptorEffect
cl_bobcycle0.01Float valueSpeed of viewmodel bobbing.
cl_bobup1Float valueScale of forward/backward bobbing for viewmodel.
cl_bobside1Float valueScale of left/right bobbing for viewmodel.
cl_viewmodel_lag3Float valueScale of the lag when you move player's camera. Minimum value is 0, maximum value is 50.
cl_csm_cascade_viewmodel_ignore0Bool valueEnable/disable self-shadowing of viewmodel from CSM.
Icon-Bug.pngBug:CSM shadows don't apply properly if this is enabled.
cl_csm_viewmodel_shadows1Bool valueEnable/disable CSM on viewmodel.
cl_csm_viewmodel_max_shadow_dist21Float valueThe max distance at which CSM will be displayed on viewmodel.
Note.pngNote:Recommended value is 37 and not default 21.
cl_csm_viewmodel_farz30Float valueThe max allowed distance at which CSM will be displayed on viewmodel.
Note.pngNote:Recommended value is 37 and not default 30.
cl_csm_viewmodel_max_visible_dist100Float valueIt doesn't affect anything.
cl_csm_viewmodel_slopescaledepthbias1.5Float valueCSM slope scale depth bias on viewmodel.
cl_csm_viewmodel_depthbias0.00005Float valueCSM depth bias on viewmodel.
vr_viewmodel_translate_with_head0Float valueSource SDK leftover.
vr_viewmodel_offset_forward-8Float valueSource SDK leftover.
vr_viewmodel_offset_forward_large-15Float valueSource SDK leftover.
r_drawviewmodel1Bool valueEnable/disable viewmodel draw.
viewmodelfxInteger valueThis is a debug command that was created to test the blood/slime on viewmodel. 0 - red blood, 1 - green blood, 2 - slime, 3 - no blood/slime.
cl_mdldetailfx_enable1Bool valueEnable/disable blood/slime on viewmodel generally.
cl_mdldetailfx_universal_hands1Bool valueEnable/disable blood/slime for right hand (satchel only).
cl_mdldetailfx_enable_hands1Bool valueEnable/disable blood/slime on hands (arms bodygroup).
cl_mdldetailfx_blood_time60Float valueAmount of time before blood (red and green) on viewmodel will disappear.
cl_mdldetailfx_slime_time10Float valueAmount of time before slime on viewmodel will disappear.