Overview
I will show you how to get the old bobbing from WON back into the Steam version of Half-Life. Little programming experience is needed.
I. What is “bobbing?”
The literal definition of ‘bob’ is when something moves quickly up and down. In Half-Life, the viewmodel moves back and forth as you walk around. This is called bobbing.
II. What is the WON bobbing?
In the retail version of Half-Life, aka the WON version, the viewmodel bob was much better. It went corner to corner and when you would strafe or turn, the screen tilted slightly.
Video demonstration:
III. Installing Visual Studio
If you don’t have it already, you need to get Visual Studio 2019 Community to be able to edit Half-Life’s code.
Download it here:
[link]
In the Visual Studio Installer, select Desktop Development for C++.
IV. Downloading the Half-Life SDK
GitHub is a popular website where developers host repositories for their code. Valve Software hosts 40+ repositories, and one of which is called “halflife” and is the repository for Half-Life SDK 2.4. It contains the source code for the client.dll and game.dll files for Deathmatch Classic, Half-Life and Ricochet. We will not be downloading the official Valve repository though, because it is very outdated and has build errors. We will be downloading a fan-made modiifcation of the repo called “halflife-updated” and it works with Visual Studio 2019.
To download it, go to [link] and press the green button, then Download ZIP. Extract the ZIP to anywhere of your liking.
Once it’s finished downloading and extracting, go to where you extracted the repository, and go to projects -> vs2019 and open the projects.sln file. Visual Studio 2019 should open.
V. Adding viewroll
Now, we can modify the code. In the solution explorer on the right, open hl_cdll, open the Source files folder, then open the cl_dll folder and double click on hud.cpp. Head down to line 85 and paste this code below cvar_t *cl_lw = NULL;
Then, head over to line 320:
and add this code:
Now, go into view.cpp and find this text (you can use CTRL + F):
Make a space before that line and paste this:
It should look like this:
Inside this block of code, after if ( !viewentity ) return; add this code:
VI. Adding viewmodel bob tilt
This doesn’t take very long, all you need to do is in view.cpp go to line 663 and below that add this:
Now, you’re done! Go to Build -> Build All.
VIII. Getting the Built DLL
Where the projects.sln file is, there should now be a folder called Debug. Go to the hl_cdll folder and copy the client.dll file. Now, go to your Steam library, right click Half-Life, go to properties, local files and browse local files. Go to the valve folder, cl_dlls and paste the client.dll file there and replace.
Open the game and go into any map. Now, the viewmodel bob tilt and viewroll should be back!
If you faced any problems, let me know in the comments.