View roll: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (jesus this is the third time i edited this page in 1 minute)
Line 1: Line 1:
Have you ever wanted to add that cool Black Mesa view rolling effect into your mod? Well now you can!
Have you ever wanted to add that cool Black Mesa view rolling effect into your mod? Well now you can!


{{note|''Works on every branches.''}}
{{note|''Works on all branches.''}}


== The code ==
== The code ==

Revision as of 00:21, 28 May 2021

Have you ever wanted to add that cool Black Mesa view rolling effect into your mod? Well now you can!

Note.pngNote:Works on all branches.

The code

First, go to movevars_shared.cpp and search around line 82 for this:

ConVar sv_rollangle ( "sv_rollangle", "0", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Max view roll angle");

Change the 0 to anything between 0 and 10. Example:

ConVar sv_rollangle ( "sv_rollangle", "3", FCVAR_NOTIFY | FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Max view roll angle");

After that, compile your mod and you should have view rolling in your mod.