Quake
Snowblind Aug 22, 2021 @ 11:33pm
How to disable screen shake effect when firing weapons?
I've started re-playing this game on my big screen TV and I'm finding the recoil / screen shake effect when firing weapons really jarring on a larger display. It's annoying at best and can be nauseating at worst (continuous shotgun fire for example).

I've tried the following variables, but they only disable screen shake when getting hit:
v_kickroll 0
v_kickpitch 0
v_kicktime 0

I also know the JoeQuake engine added a new "v_gunkick" variable for just this purpose, but I'm not sure how one would integrate that code snippet into the new Nightdive remastered version.

Note that this effect is completely absent in the original gameplay reels that play in the main menu, so presumably the devs had some way to disable it for those recordings.

Any ideas?
< >
Showing 1-2 of 2 comments
SloppyCake Aug 23, 2021 @ 12:38am 
Thanks. Now all we need is to disable it for player gun-kick.
Snowblind Aug 26, 2021 @ 5:57pm 
I've been digging around in the JoeQuake and FitzQuake code base and found the section responsible for disabling gunkick. I don't know if there is any way to incorporate this into the KEX engine (or perhaps build a small .pak mod for it). I am posting the code snippet here in the hopes that some clever Quake guru might know how to do this.

Full credit goes to the FitzQuake author for this code (https://www.celephais.net/fitzquake).

v_gunkick {0,1,2}
If 1, standard quake view kick when you fire your gun. If 2, interpolates the view kick. If 0, disables view kick entirely. Default 1.

view.c file code snippet:

//johnfitz -- v_gunkick
if (v_gunkick.value == 1) //original quake kick
VectorAdd (r_refdef.viewangles, cl.punchangle, r_refdef.viewangles);
if (v_gunkick.value == 2) //lerped kick
{
for (i=0; i<3; i++)
if (punch != v_punchangles[0])
{
//speed determined by how far we need to lerp in 1/10th of a second
delta = (v_punchangles[0]-v_punchangles[1]) * host_frametime * 10;

if (delta > 0)
punch = min(punch+delta, v_punchangles[0]);
else if (delta < 0)
punch = max(punch+delta, v_punchangles[0]);
}

VectorAdd (r_refdef.viewangles, punch, r_refdef.viewangles);
}

Last edited by Snowblind; Aug 26, 2021 @ 6:12pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Aug 22, 2021 @ 11:33pm
Posts: 2