Tutorial *1*
ok, I'm not gonna waste your time here so lets dive into the code and do some quick fixes on the engine.
Firstly, unlike in the Quake1 source we had to add MLOOK. In the Hexen2 source we just need to fix it up abit. Though Raven Software made huge enhancements they too missed this.

First-off... open the file called "in_win.c" and find the function called "IN_MouseMove".
Within that function find the commented-out line reading:
// add mouse X/Y movement to cmd

About 5 lines down you'll see this code:
if (in_mlook.state & 1)

	V_StopPitchDrift ();

Comment it out and replace it with the following:
//jkrige - [email protected]

if (in_mlook.state & 1){

	if (mx || my)

		V_StopPitchDrift ();

}

//jkrige - [email protected]

What we have fixed here is when, on the menu you turn mouselook on, you cant do any centering of your screen/view.
But when you start moving it DOES centerscreen, but that is activated by our next section of this fix:
Lookspring doesn't work!! Actually, it does work... permanantly :) We are going to fix that with a mere few lines of coding.
Here goes:
Open the file called "in_win.c" and find the function called "IN_JoyMove". Within that function find the commented-out line reading:
// *** the bug always has the lookspring feature on

Below that, comment this out:
if(lookspring.value =0.0)

	V_StopPitchDrift();

You will find another occurance of this function "IN_JoyMove" in this file.
Do the exact same thing below this line:
// *** the bug always has the lookspring feature on

Now we will be finishing this off once and for all.
Open the file called "view.c"
Find a function called "V_DriftPitch"
With that function you'll find this statement:
if ( cl.driftmove > v_centermove.value)

{

	V_StartPitchDrift ();

}

replace that with:
if ( cl.driftmove > v_centermove.value)

{

	if(lookspring.value)

		V_StartPitchDrift (); //jkrige - [email protected]

}

And that is it boyz and girlz, we have totally fixed up mlook and at the same times fixed up our lookspring code.
Jacques Krige, aka: Korax [email protected] http://www.excentrax.co.za


 
Not logged in
Sign up
Login:
Passwd: