Overview
This guide will show you how to remove the bunnyjump speed cap and add autojump as a bonus.
Video Version
If you don’t want to read this boring guide and want a detailed video tutorial, here you go:
I. BEFORE WE CONTINUE
Make a copy of the valve folder in your Half-Life directory and rename the copy to whatever you want. Make sure there are no spaces in the folder name. Inside that folder, open liblist.gam with Notepad and change
to
or whatever you want. Then, restart Steam and the game should appear in your library as a mod.
II. 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++. You may also want to head to Individual Components and install Windows XP Support for C++.
III. 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.3. 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 modifcation 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.
IV. Removing the bhop cap
In the solution explorer, open hldll and go to Source files->pm_shared->pm_shared.cpp. Go to line 2444, and you should see this block of code:
This block of code tells the engine that if the player is constantly jumping, and the speed goes above a certain limit, the ups (units per second) will drastically crop down to 320. We need to comment out this block of code, meaning the compiler will ignore it.
Above void PM_PreventMegaBunnyJumping(void), add this: /*
Then, after the last line of that block of code, add this: */
Now, the block of code should be in green.
Next, go to line 2559. You should see this:
Comment that out by adding // before it (on the same line) or remove the line.
V. (Optional) Adding Autojump
To add autojump, open pm_shared.cpp again, and go to line 2554. You should see this block of code:
Comment this code out by adding /* before if and adding */ after stick. The entire block of code should turn green.
VI. Building
Now that you’ve edited pm_shared.cpp, you need to build the solution. Press CTRL + SHIFT + B and the solution should start building. Once it’s finished, go to the halflife-updated folder, projects->vs2019->Debug. Put the client.dll file from hl_cdll in yourvalvecopyfoldercl_dlls and the hl.dll file from the hl_dll folder in yourvalvecopyfolderdlls. Replace the files.
Now, open your mod, and you should be able to bhop and autojump should work if you added it!
If you ran into any issues, let me know in the comments. There is no need to add me as a friend.