Quake/Half-Life View bobbing

If you liked this item, please rate it up on Steam Workshop page.

Author: upset

Last revision: 27 Jul, 2024 at 07:04 UTC

File size: 7.49 KB

On Steam Workshop

Description:

A clientside script that adds Quake/Half-Life view bobbing to GMod. To make it work in multiplayer, script should be installed on server or clientside scripts should be allowed.

Convars:

cl_q1_enable (1 or 0) – enable the script
cl_q1_overridehooks (1 or 0) – allow overriding SWEP view hooks, disabled by default

cl_q1_viewbob (1 or 0) – enable view bobbing
cl_q1_viewroll (1 or 0) – enable view roll
cl_q1_weaponbob (1 or 0) – enable weapon bobbing

cl_q1_bob (def. 0.02)
cl_q1_bobcycle (def. 0.6)
cl_q1_bobup (def. 0.5)
cl_q1_rollangle (def. 2)
cl_q1_rollspeed (def. 200)

Settings are available in Utilities menu

HL1 values:
bob = 0.01
bobcycle = 0.8
bobup = 0.5

Note:

If you enable Override Hooks option, the script overrides CalcView and CalcViewModelView hooks for EVERY SWEP, so things like ironsights won’t work and some ones like CW 2.0 might be completely ♥♥♥♥♥♥ up. Be careful with that setting.

Credits:

John Carmack – for the original C++ code
me for porting it to GLua